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

Is there any difference between the primary key and unique key?

744


can any body tell me how to know the password of current user in sql server

1772


New concepts of sql server 2005 use in your project.

2094


Explain can you implement data mining in ssrs?

122


What is an indexed view?

744






How to change the system date and time from SQL Plus Terminal ?

857


What is open database communication (odbc)?

750


What is the guest user account in sql server? What login is it mapped to it? : sql server security

760


What are sp_configure commands and set commands?

719


What is inline table-value user-defined function?

772


Explain different backup plans?

702


What are four major operators that can be used to combine conditions on a where clause?

760


How many types of schemas are there?

730


What are basics of policy management?

823


how to control the amount of free space in your index pages? : Sql server database administration

759