|
Re: Sequence [message #90601 is a reply to message #90592] |
Sun, 09 May 2004 22:43 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
abcd
Messages: 7 Registered: November 2001
|
Junior Member |
|
|
You do not add sequences to a table. You add sequences to the schema and then use the sequence to populate some column in your table. Let's say your table is :
incident_report( report_uid number, report_name varchar2(20) );
and you want to populate the "report_uid" column thru a sequence, then first create a sequence as :
create sequence report_seq start with 1 increment by 1;
Now, use it to populate your table:
insert into incident_report ( report_uid, report_name ) values ( report_seq.nextval, 'Test Report') ;
commit;
HTH
|
|
|