Using %ROWTYPE With Table Rows
DECLARE
emprec employees_temp%ROWTYPE;
BEGIN
emprec.empid := NULL; -- this works, null constraint is not inherited
-- emprec.empid := 10000002; -- invalid, number precision too large
emprec.deptid := 50; -- this works, check constraint is not inherited
-- the default value is not inherited in the following
dbms_output.Put_line('emprec.deptname: '
||emprec.deptname);
END;
/
0 comments:
Post a Comment