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...

here id col have primary key and identity
id name
1 a
2 b
3 c
4 d

delete 2nd row then o/p will be

id name
1 a
3 c
4 d

next inssert 2nd row and i want o/p will be
id name
1 a
2 e
3 c
4 d

Answer Posted / qwerty

set identity_insert <table_name> on
insert into <table_name>(id,name) values(2,'e')
set identity_insert <table_name> off

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between commit and rollback?

875


What is the main purpose of having conversation group?

846


Does a sql server 2005 select statement require a from?

969


What is SQL Azure Federations?

112


What are extended events in sql server?

903


What are different type of Collation Sensitivity?

944


How many full-text indexes can a table have?

926


Please explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?

881


Does index slows down insert statements?

936


John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?

884


What is unique key constraint?

987


What is store procedure? How do they work? When do you use?

885


What does truncate do?

885


How to check if a table is being used in sql server?

902


What are the tool windows in sql server management studio? : sql server management studio

1014