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

How will you go about resolving deadlocks?

689


What is abstracting periodical?

699


What is rs.exe utility?

138


What protocol does sql server use?

697


How to rename an existing table with the "sp_rename" stored procedure in ms sql server?

722






What are recommended options to be used while using db mirroring? : sql server database administration

759


Do you know what is blocking?

727


Does any body please help me what question's have asked for SSRS in the interview?

1873


How to assign null values to variables or columns?

710


How you can change a cross join into an inner join?

713


What are the differences between triggers and stored procedures?

724


What is serializable?

824


Explain different types of Normalization.

1143


How to receive output values from stored procedures?

701


Delete duplicate rows without using rowid.

1273