Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to Get the last identity value used

Answers were Sorted based on User's Feedback



How to Get the last identity value used..

Answer / laxman

select @@identity

@@identity is global variable

Is This Answer Correct ?    4 Yes 0 No

How to Get the last identity value used..

Answer / guest

the last identity value used in an insert can be retrieved
with the @@identity function.

Is This Answer Correct ?    3 Yes 0 No

How to Get the last identity value used..

Answer / j.m.

dbcc checkident(table)

Is This Answer Correct ?    1 Yes 0 No

How to Get the last identity value used..

Answer / chandramohan

scope_identity() would be the currect answer. To avoid potential problems professionals suggests this method since it returns the recently added value.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More SQL Server Interview Questions

How do I trace a query in sql server?

0 Answers  


Define synonym?

0 Answers  


How to provide column names in insert statements in ms sql server?

0 Answers  


Write the Syntax for Cursors.

2 Answers   CarrizalSoft Technologies, HP,


HOW TO FIND THE EMPLOYEE DETAILS WHO ARE GETTING SAME SALARY IN EMP TABLE

18 Answers   Infosys, TCS,


What is awe?

0 Answers  


What is collation sensitivity? Explain different types.

0 Answers  


Give the query of getting last two records from the table in SQL SERVER?

0 Answers   Petranics Solutions,


What is the difference between a Application Server and a Database

3 Answers   Oracle,


Explain indexing and what are the advantages of it?

0 Answers  


Can a function call a stored procedure in sql server?

0 Answers  


What are the system database in sql server 2005?

0 Answers  


Categories