0

I have student table with 3 atributes STUDENT_ID, NAME and AGE

I'm getting this error after executing the query Query:

INSERT INTO student(STUDENT_ID, NAME, AGE) 
values
(3, 'WILSON', 40),
(4, 'ALEX', 30);

Error: ORA-00933: SQL command not properly ended

1 Answers1

0

You can use INSERT INTO .. SELECT and UNION ALL as follows:

INSERT INTO student(STUDENT_ID, NAME, AGE) 
SELECT 3, 'WILSON', 40 FROM DUAL UNION ALL
SELECT 4, 'ALEX', 30 FROM DUAL;
Popeye
  • 35,427
  • 4
  • 10
  • 31