Simple question- I just want to learn how to write a query that will insert 2 rows into my table by writing one query, instead of 2 separate ones. My queries work completely fine, I just want to know a simpler way, if that's possible. Below are my 2 queries that I'd like to combine into 1.
INSERT INTO dept (deptno, dname)
VALUES (dept_id_seq.NEXTVAL, 'EDUCATION');
INSERT INTO dept (deptno, dname)
VALUES (dept_id_seq.NEXTVAL, 'ADMINISTRATION');
As I stated above, my code works as expected. Here is my output with NO errors-
DE DNAME LOC
-- ------------------------------ ------------------------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
60 EDUCATION
70 ADMINISTRATION
Thank you for anyone's help!