Reputation: 377
i would like to know how to insert multiple rows in a single table,i am trying these commands below but im getting errors
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;
is there any way i can do this?or where am i making my mistakes?thanks in advance this is the error im getting
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:
Upvotes: 1
Views: 1356
Reputation: 17080
You need to select something from DUAL, you can't use it like this.
do:
SELECT * FROM DUAL;
Upvotes: 1