Gaz124
asked on
Find name of SQL Sequence
I'm currently trying to write an insert query for a db and want to get the next value from a sequence for one of the insert fields.
The only problem is I don't know what the sequence is called! I can query the table and see the sequences in there but I cant find out the actual name of the sequence??
If anyone could help that would be great
The only problem is I don't know what the sequence is called! I can query the table and see the sequences in there but I cant find out the actual name of the sequence??
If anyone could help that would be great
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks angellll, at least I know im not going nuts now. I'll contact the application writers.
mkobrin - I think you misunderstood the question
mkobrin - I think you misunderstood the question
insert into a (a,b,c) values (1,2,3)
select @@identity as newID
will insert the record and return the new id in a field called newID