Identity property - how take off ?

  • Hi All,
     
    How Can I alter column of a table which has an identity property ?
    I want to take off this property.
    In BOL has no information about this.
     
    Cheers ,
    Norbert A
  • Probably the easiest way is to use EM for this. but rather than saving the table, click on Generate Change Script. This can you schedule for off-peak hours. When you look at it, you'll see why. Unfortunately there is no plain T-SQL for this.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • you can insert/Change your values into the idenity column of a table by setting the IDENTITY_INSERT option ON

    to make Idenity return again, set the IDENTITY_INSERT option OFF

    note: I think this affects all Identity Columns in all Database .. so take care

    I hope this help u.


    Alamir Mohamed
    Alamir_mohamed@yahoo.com

  • No, it doesn't affect all identity columns. Actually only one table at a time in a session can be  used with SET IDENTITY_INSERT, otherwise an error message is raised.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

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