Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identity Column

Status
Not open for further replies.

pgthyagu

Technical User
May 27, 2002
9
IN
Is there a way to get the Current Identity Value of a table from any System Table ?i.e an SQL Query to get the Current Identity Value. I Don;t want to use the Functions given in SQL.

If it is not stored in the System Table how is this maintained.

Regards

Thyagu
 
I dont know how it is stored but a simple way of getting the next value to be used(assuming that the identity field is incremental with a increment of 1) would be to

select max(youridentfield) +1 as nextidentity from yourtable

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top