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???
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
How to recover from sql injection? : sql server security
Will the writetext statement activate a trigger?
what is bit datatype? : Sql server database administration
What is the difference between Temporary table variable and a Table variable? Or Which Table variable I should use inside Stored procedure?
3 Answers Microsoft, TCS, Techastrum,
How to get the definition of a user defined function back?
What is a document index?
What do you understand by replication in sql server? Mention the different types of replication in sql server.
How do database indexes work?
Can you explain the role of each service?
How to divide query output into multiple groups with the group by clause in ms sql server?
How to delete duplicate records based on single column from a table?
0 Answers Petranics Solutions,
What is RAID and what are different types of RAID configurations?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)