|
-
June 21st, 2005, 05:05 PM
#7
Re: Adding a record in SQL with an autonumber
in oracle we do:
insert into table1
select max(id_number)+1, 'literal value for column 1', 'value for column 2', 'col 3' ...
from table1
the select statement returns 1 row that has:
the max id number +1, followed by all the literal text you put in, in columns
this row is then inserted. clever eh?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|