How can I combine sequence with select statement which is used in another insert statement. i.e.Insert into table1select seq_id.currval,field1,..,fieldnfrom table2;How can I make the above sentence possible?

Questions by deshaniprashant

Showing Answers 1 - 2 of 2 Answers

Divesh

  • Apr 23rd, 2006
 

u can directly use insert into < table_name> select .currval/nextval from dual.Please free to contact me if any queries on dibansal@cisco.com

  Was this answer useful?  Yes

developer

  • Sep 14th, 2006
 

Hi,

for example u have a sequence called s1 and table as student then

insert into student values(s1.nextval,field1,field2, ....);

that's all

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions