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

How do I port a number to sql server?

1022


How many cores do I need for sql server 2016?

877


Why I can not enter 0.001 second in date and time literals in ms sql server?

1047


What does Master database contains?

1116


How to create a trigger for insert only?

1023


How can we get count of the number of records in a table?

941


Explain what are commit and rollback in sql?

914


What is auditing in sql server?

914


What is table constraint?

975


How to receive output values from stored procedures?

1122


How to create database with physical files specified in ms sql server?

980


What is difference between createstatement and preparedstatement?

1071


Where do you find the default Index fill factor and how to change it?

1050


What is Extended user-defined?

945


How to execute multiple stored procedures at one time in sql server?

990