Example 2-8 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;
/