Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Save rowtype and data inside a table

muttleychessDec 16 2015 — edited Dec 19 2015

Hi

  How can cai to save a rowtype of a table  anda yours data inside a table

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;

  In Example above   I would like to save all columns of emprec inside a table,  of course  emprec have only record , I need to save name of column and Data

If emprec was a table record ?

How can I to do It ?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2016
Added on Dec 16 2015
9 comments
999 views