Insert into dept (deptno, dname, loc) values (10, 'accounting', 'New York');
Insert into dept (deptno, dname, loc) values (20, 'research', 'Dallas');
CodePudding user response:
Can use an insert statement:
With TMP as
(
Select deptno, dname 'accounting', 'New York' loc from dual
Union all
Select deptno, 20 'research' dname, 'Dallas' loc from dual
)
Insert into dept (deptno, dname, loc) select * from TMP.
The last remember to commit
CodePudding user response:
Upstairs principle first see the view, then select data from the view, can solve the problem of the buildingCodePudding user response:
Rookie, should use habits, first batch again, multi-line write also have advantages, not one by one place wrong, seek along while don't know where is wrong!