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
How do I port a number to sql server?
How many cores do I need for sql server 2016?
Why I can not enter 0.001 second in date and time literals in ms sql server?
What does Master database contains?
How to create a trigger for insert only?
How can we get count of the number of records in a table?
Explain what are commit and rollback in sql?
What is auditing in sql server?
What is table constraint?
How to receive output values from stored procedures?
How to create database with physical files specified in ms sql server?
What is difference between createstatement and preparedstatement?
Where do you find the default Index fill factor and how to change it?
What is Extended user-defined?
How to execute multiple stored procedures at one time in sql server?