If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Getting the next identity value to be used in a table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-25-11, 04:26
jeevana jeevana is offline
Registered User
 
Join Date: Jul 2011
Posts: 15
Question Getting the next identity value to be used in a table

Hi,

Can some one help me with getting a next identity value to be used in a table.
I need to get the identity value(the auto-increment value)before performing an insert into the table.

Any immediate help on this is highly appreciated.

Regards,
Jeevana.
Reply With Quote
  #2 (permalink)  
Old 08-25-11, 08:37
pradyut.dhara pradyut.dhara is offline
Registered User
 
Join Date: May 2011
Posts: 28
Hi,
You can use next_identity function to retrieve the value in ASE 15.5.
Code:
select next_identity (<table Name>)
go
Reply With Quote
  #3 (permalink)  
Old 08-25-11, 09:41
jeevana jeevana is offline
Registered User
 
Join Date: Jul 2011
Posts: 15
Red face

Could u pls let me know if there is there is any similar function in SQL Anywhere10.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On