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

Tell me the phases a transaction has to undergo?

958


Do you know what are various aggregate functions that are available?

1114


What gets stored inside msdb database?

1243


What is unpivot?

1008


What is cursors?

1172


Explain the stored procedure?

1042


How to test values returned by a subquery with the in operator?

1189


Can you explain what are the restrictions applicable while creating views? : SQL Server Architecture

911


What is the size of transaction log file?

924


What do you mean by table and field in sql?

1001


What is 1nf normalization form?

1027


What is normalization 1nf 2nf 3nf?

1058


What is join and name different type of joins?

1045


How many types of cursor type are there?

1083


What is shared lock?

895