PL/SQL (MOSC)

MOSC Banner

Records Store

edited Feb 24, 2012 1:16AM in PL/SQL (MOSC) 15 commentsAnswered ✓
Hi All

Need your help in identifying of records during insertion

Here is the scenario

If we inserted records in a table EMP, the selected records (result set of select statments), need to udpate the value for those particular records
that are inserted


Insert into emp
select empno_seq.next_val,empno,ename,deptno,dname,sal,hiredate,mgr
from dept, sal , grade
 where  . . . . .
              . . . . .
;

update emp set col1 =

where emp_no in (result set of above select statment);

can we identify/store the record details during insertion and how many ways can we do this

Because of the seq value in the select statment, we cannot use the same select statment again, to fetch/store the values

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center