sql server中主键列的插入问题

仅当使用了列列表并且 IDENTITY_INSERT 为 ON 时,才能为表'dbo.t_test'中的标识列指定显式值。

SET IDENTITY_INSERT dbo.t_test ON
INSERT INTO dbo.t_test(id,name) VALUES (4,'c')
SET IDENTITY_INSERT dbo.t_test OFF
posted @ 2014-12-19 16:21  Bin_x  阅读(263)  评论(0编辑  收藏  举报