how to get last primary key in sql

Solved:
If you want to get last primary key id instead of Max() aggregate function:
IDENT_CURRENT('dbo.TableName') this is the best method to get last primary key id this is helpful for logic's

Comments

Popular posts from this blog

ConfigurationManager ConnectionStrings not available in c#

How to make script with data in sql