Use of IDENTITY_INSERT?

  • Comments posted to this topic are about the item Use of IDENTITY_INSERT?

    KSB
    -----------------------------
    Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Knowledge and happiness never decreases by being shared.” - Buddha

  • Thanks for the question!

  • nice and simple, thanks 🙂

  • OK, this one was too easy 🙂

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Both Question and answer don't have sufficient information about target.

    What is the purpose of IDENTITY_INSERT ?

    And answer

    SET IDENTITY_INSERT allows explicit values to be inserted into the identity column of a table.

    SET IDENTITY_INSERT is not meaningful and you can not identify result until ON or OFF is not include in this statement. SET IDENTITY_INSERT it self not allows explicit values to be inserted into the identity column of a table until you don't include ON in this.

  • Developer 2005 (8/11/2010)


    Both Question and answer don't have sufficient information about target.

    What is the purpose of IDENTITY_INSERT ?

    And answer

    SET IDENTITY_INSERT allows explicit values to be inserted into the identity column of a table.

    SET IDENTITY_INSERT is not meaningful and you can not identify result until ON or OFF is not include in this statement. SET IDENTITY_INSERT it self not allows explicit values to be inserted into the identity column of a table until you don't include ON in this.

    http://msdn.microsoft.com/en-us/library/ms188059.aspx

    Read the first two lines of this document...

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • da-zero (8/11/2010)


    Developer 2005 (8/11/2010)


    Both Question and answer don't have sufficient information about target.

    What is the purpose of IDENTITY_INSERT ?

    And answer

    SET IDENTITY_INSERT allows explicit values to be inserted into the identity column of a table.

    SET IDENTITY_INSERT is not meaningful and you can not identify result until ON or OFF is not include in this statement. SET IDENTITY_INSERT it self not allows explicit values to be inserted into the identity column of a table until you don't include ON in this.

    You forgot to mention permissions or it won't work. Cmon people, it was a simple question that if you want to know more about it follow the link that was posted. I think some people are just mad they didn't get their points. 🙂

    Seriously though, thank you for the question.

  • Good question, thanks

    Steve Jimmo
    Sr DBA
    “If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan

  • hi da-zero

    you are right and also that is mention in msdn.

    but we can do both by this statement,either insert explicite or implicit.for more clearity ,it should be include.

  • Thanks for the question.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Somehow QoTD regularly reinforces recently acquired knowledge. Like this....thanks.

  • This was easy.

    SQL DBA.

  • Pretty straight-forward question if one understond the question right. Thanks.

Viewing 13 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic. Login to reply