Welcome to Sign in | Help

Re: Alterarea unei coloane IDENTITY

  •  02-19-2007, 11:19 AM

    Re: Alterarea unei coloane IDENTITY

    uite un exemplu:

     

    create table t1 (a int identity, b int)

    GO

    insert t1(b)values(3)

    insert t1(b)values(3)

    insert t1(b)values(3)

    insert t1(b)values(3)

    GO

    select * from t1

    --a b

    --1 3

    --2 3

    --3 3

    --4 3

    GO

    set identity_insert t1 on

    insert t1(a,b) values (6,6)

    set identity_insert t1 off

    insert t1(b)values(3)

    GO

    select * from t1

    --1 3

    --2 3

    --3 3

    --4 3

    --6 6

    --7 3


    Cătălin D.
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems