我想知道如何在一个表中插入多行,我正在尝试下面的这些命令,但我得到错误
insert all
into hr.dean (id,first_name,last_name,phone_number,room_number,faculty,kafedra) values ('3','zulu','smart','+7905487265','421','airsapce','mathematics')
into hr.dean (id,first_name,last_name,phone_number,room_number,faculty,kafedra) values ('4','hendrix','mumba','+7805454721','521','mechanics','physics')
into hr.dean (id,first_name,last_name,phone_number,room_number,faculty,kafedra) values ('5','banda','edward','+260966645820','411','mechanics','chemistry')
into hr.dean (id,first_name,last_name,phone_number,room_number,faculty,kafedra) values ('6','nkoseman','lone','+260966665821','200','computers','informatics')
select from dual;
有什么方法可以做到这一点?或者我在哪里犯错误?提前感谢 这是我得到的错误
Error starting at line 1 in command:
insert all
into hr.dean (id,first_name,last_name,phone_number,room_number,faculty,kafedra) values ('3','zulu','smart','+7905487265','421','airsapce','mathematics')
into hr.dean (id,first_name,last_name,phone_number,room_number,faculty,kafedra) values ('4','hendrix','mumba','+7805454721','521','mechanics','physics')
into hr.dean (id,first_name,last_name,phone_number,room_number,faculty,kafedra) values ('5','banda','edward','+260966645820','411','mechanics','chemistry')
into hr.dean (id,first_name,last_name,phone_number,room_number,faculty,kafedra) values ('6','nkoseman','lone','+260966665821','200','computers','informatics')
select from dual
Error at Command Line:6 Column:7
Error report:
SQL Error: ORA-00936: missing expression
00936. 00000 - "missing expression"
*Cause:
*Action:
答案 0 :(得分:1)
您需要从DUAL中选择一些内容,不能像这样使用它。
做的:
SELECT * FROM DUAL;