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

OPTIMIZATION OF SP,CURSOR,TRIGGERS

2785


Can sql server 2016 run on windows 7?

917


Explain the architecture of ms sql reporting service?

921


Explain indexed views and partitioned view with their syntax.

1146


What is "scheduled jobs" or "scheduled tasks"?

979


What is the difference between index seek vs. Index scan?

1023


How many columns can we include on clustered index ?

990


What do you mean by an execution plan?

1117


How many triggers you can have on a table?

995


Explain the microsoft sql server delete command? : SQL Server Architecture

1086


How to create prepared statements using odbc_prepare()?

1065


In case you have filters in your report, when filters will be applied in cached report instance?

113


Explain different types of collation sensitivity?

982


How to use transact-sql statements to access the database engine?

1067


What are xml indexes?

952