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 we can count records as a group of days like sum of records for(four mondays),(four tuesday)........ in a month. group the column for weekdays.

1 Answers  


How many types of dimensions are there and what are they? : sql server analysis services, ssas

0 Answers  


What is sql server schema compare? How we can compare two database schemas?

0 Answers  


How to update values in a table with update statements in ms sql server?

0 Answers  


Which system tables contain information on privileges granted and privileges obtained

1 Answers  


How to connect to a sql server using odbc_connect()?

0 Answers  


Is it possible to create trigger on views?

0 Answers  


What are various limitations of the views?

0 Answers  


What is microsoft sql server?

0 Answers  


What is the difference between an index and a unique index?

0 Answers  


What are the types of model in sql server and explain

2 Answers   TCS,


Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you

0 Answers  


Categories