Setting Identity to on or off in SQL server

后端 未结 6 736
日久生厌
日久生厌 2021-02-12 18:26

I want to set Is Identity property of a column to off and after inserting an explicit value setting it to on again.I\'ve written this query :

SET IDENTITY_INSERT         


        
6条回答
  •  醉酒成梦
    2021-02-12 19:10

    Set identity_insert on to be able to explicitly set the value of the id column. Set it off again to auto-assign.

提交回复
热议问题