Why would you use insert into dept values didbuild;
instead of insert into dept values did_insrt
in the following code?:
SET SERVEROUTPUT ON;
declare
did_insrt dept%rowtype;
Begin
did_insrt.did := 4;
did_insrt.dname := 'accounting';
insert into dept values didbuild;
end;
Select * from dept;
答案 0 :(得分:0)
It should be did_insrt.
If record variable is created using the %ROWTYPE command then we would be able to insert record directly into the table.
declare
did_insrt dept%rowtype;
Begin
did_insrt.did := 4;
did_insrt.dname := 'accounting';
insert into dept values did_insrt;
commit;
end;