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

Say if we have a table that contains only a single column ,
say OrderID, which has IDENTITY attribute defined on it. So
how can we insert data in this table.

I am reframing my question, that how can we make the table
to increment the column "OrderID" value several times???

Answer Posted / madhu

To insert values into Identity column use the
IDENTITY_INSERT option like

SET IDENTITY_INSERT Table_Name ON
Insert Table_Name
(OrderID)
Values(10)
SET IDENTITY_INSERT Table_Name OFF

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why the trigger fires multiple times in single login?

1152


Are all views updatable ?

1103


What is clustered primary key?

958


Beginning with sql server version 7 0, a new enhanced data type nchar was added what type of data is supported with this data type?

963


What is the difference between left and right outer join?

1016


Explain what is lock escalation?

988


How can I change procedure name in sql server?

973


what is the primary use of the model database? : Sql server administration

962


What is policy management?

933


What is a periodical index?

864


What does this statement do @@rowcount?

924


What are the filtered indexes?

976


What is cached report?

135


What is explicit cursors?

988


how to create a scrollable cursor with the scroll option? : Sql server database administration

1025