摘要: 在对象资源管理器中,右键单击要更改其标识属性的列所在的表,再单击“设计”(在 SP1 或更早版本中为“修改”)。此时,将在表设计器中打开该表。清除要更改的列的“允许空值”复选框。在“列属性”选项卡中,展开“标识规范”属性。单击“是标识”子属性的网格单元格,... 阅读全文
posted @ 2010-05-14 22:38 greencolor 阅读(220) 评论(0) 推荐(1) 编辑
摘要: identity(1,1)是指每插入一条语句时这个字段的值增1,(不能插入) identity primary key是指个主键,表示唯一的意思,(也不能插入),也是自增 两者基本上是沒有什么分別的, 最大的区別是: 系统默认identity primary key会为主键加上索引 就是說,建立identity prmary key 系统會加上索引,而identity不会 阅读全文
posted @ 2010-05-14 19:29 greencolor 阅读(225) 评论(0) 推荐(1) 编辑
摘要: set IDENTITY_INSERT OutDetails oninsert OutDetails(Outid, Goodsid, OutDepot, Amount, OutPrice) values(2, 39, 2, 1, 1.00) 阅读全文
posted @ 2010-05-14 19:28 greencolor 阅读(121) 评论(0) 推荐(1) 编辑