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 / brahma

create table t1(a int identity(1,1))
insert into t1 default value

set identity_insert t1 off
(or)
set identity_insert t1 on

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give an example of why you would want to denormalize a database

966


What is the standby server?

938


What is a rollup clause?

953


Explain what stored procedure sp_replcounters is used for? : sql server replication

1488


What command is used to create a database in the sql server and how?

1160


How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?

1091


How to drop an existing user defined function in ms sql server?

1016


What is updatable resultset?

986


What happens to a statement batch if there is a compilation error?

939


How do I view a stored procedure in sql server?

970


Explain candidate key, alternate key, and composite key?

979


Explain ms sql server reporting services vs crystal reports?

904


What is difference between materialized view and view?

897


How to count duplicated values in a column in ms sql server?

1058


Can you create a logon trigger in sql server 2005 express edition?

1064