例如(我正在创建一个虚拟表,因为您没有提供CREATE TABLE语句):
SQL> create table owner 2 (o_id number, 3 o_first varchar2(20), 4 o_last varchar2(20), 5 o_line varchar2(100), 6 o_city varchar2(50), 7 o_state varchar2(10), 8 o_zip varchar2(10), 9 o_phone varchar2(20), 10 o_email varchar2(50)); Table created. SQL> SQL> insert into owner 2 (o_id, o_first, o_last, o_line, o_city, o_state, o_zip, o_phone, o_email) 3 values 4 (1102, 'Chris', 'Leaves', '141-17 Union Turnpike Apt 3P','Flushing', 'NY', 5 '11367', '7182105108','chris2@gmail.com'); 1 row created. SQL> SQL> insert into owner 2 (o_id, o_first, o_last, o_line, o_city, o_state, o_zip, o_phone, o_email) 3 values 4 (1433, 'Steve', 'Jobs', '88-12 Main Street','Flushing', 'NY', '11367', 5 '7189998476', 'steve12@gmail.com'); 1 row created. SQL>
或者,你可以使用 INSERT ALL :
INSERT ALL
SQL> insert all 2 into owner 3 (o_id, o_first, o_last, o_line, o_city, o_state, o_zip, o_phone, o_email) 4 values 5 (1102, 'Chris', 'Leaves', '141-17 Union Turnpike Apt 3P','Flushing', 'NY', 6 '11367', '7182105108','chris2@gmail.com') 7 into owner 8 (o_id, o_first, o_last, o_line, o_city, o_state, o_zip, o_phone, o_email) 9 values 10 (1433, 'Steve', 'Jobs', '88-12 Main Street','Flushing', 'NY', '11367', 11 '7189998476', 'steve12@gmail.com') 12 select * from dual; 2 rows created. SQL>
要么, UNION (ALL) :
UNION (ALL)
SQL> insert into owner 2 (o_id, o_first, o_last, o_line, o_city, o_state, o_zip, o_phone, o_email) 3 select 4 1102, 'Chris', 'Leaves', '141-17 Union Turnpike Apt 3P','Flushing', 'NY', 5 '11367', '7182105108','chris2@gmail.com' 6 from dual 7 union all 8 select 9 1433, 'Steve', 'Jobs', '88-12 Main Street','Flushing', 'NY', '11367', 10 '7189998476', 'steve12@gmail.com' 11 from dual; 2 rows created. SQL>
现在您有3个选项,选一个。