January 24, 2009 at 11:16 am
Comments posted to this topic are about the item IDENTITY_INSERT
January 26, 2009 at 1:40 am
I think that the answer “You cannot set IDENTITY_INSERT on for more than one table in a database” should be changed to You cannot set IDENTITY_INSERT on for more than one table at the same time in a SESSION.
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 26, 2009 at 8:19 am
Adi Cohn (1/26/2009)
I think that the answer “You cannot set IDENTITY_INSERT on for more than one table in a database” should be changed to You cannot set IDENTITY_INSERT on for more than one table at the same time in a SESSION.Adi
To clarify further I would think
You cannot set IDENTITY_INSERT on for more than one table AT A TIME in a SESSION.
🙂
January 26, 2009 at 3:16 pm
You want to correct a problem with two of your tables with keys created by identity values.
Personally I think this implies that there is erroneous data to be removed before an insert.
Inserting without deleting will simply add data without rectifying the problem. (generalisation)
January 26, 2009 at 8:02 pm
Does anybody else but me think that Order_details is designed wrongly? OrderID should be a foreign key to Orders.OrderID. The natural key of Order_Details is OrderID and LineItemID which does not require an IDENTITY column at all.;)
January 26, 2009 at 9:29 pm
hmmm, over-think question we are. IDENTITY_INSERT is the heart of the question, not design of the tables.
January 27, 2009 at 9:06 am
Correcting the question now. good points about the session.
March 18, 2009 at 10:38 am
Adi Cohn (1/26/2009)
I think that the answer “You cannot set IDENTITY_INSERT on for more than one table in a database” should be changed to You cannot set IDENTITY_INSERT on for more than one table at the same time in a SESSION.Adi
true. very misleading
January 28, 2013 at 5:18 am
nice basic question 🙂
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
June 15, 2015 at 1:23 am
Thanks Dear,
It is really a good question for developers...
Thanks,
Shiva N
Database Consultant
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply