how to turn off IDENTITY_INSERT when inserting explicit value for identity column? thanks!
s*c
2 楼
~~~? on? Only the table owner, the Database Owner, or the System Administrator can explicitly insert a value into an IDENTITY column. Before inserting the data, the user must set the identity_insert option on for the table. A user can set identity_insert on for only one table at a time in a database. This example specifies a "seed" value of 101 for the IDENTITY column: set identity_insert sales_daily on insert into sales_daily (syb_identity, stor_id) values (101, '13-J-9'
【在 i****s 的大作中提到】 : how to turn off IDENTITY_INSERT when inserting explicit : value for identity column? thanks!
i*s
3 楼
you are right, should be on instead. thanks a lot, skeptic.
【在 s*****c 的大作中提到】 : : ~~~? on? : Only the table owner, the Database Owner, or the System : Administrator can explicitly insert a value into an IDENTITY : column. Before inserting the data, the user must set the : identity_insert option on for the table. A user can set : identity_insert on for only one table at a time in a : database. : This example specifies a "seed" value of 101 for the : IDENTITY column: