请问在SQL Server 2000中设计表时如何得到自动编号字段?

像Access中的自动编号字段,谢谢
---------------------------------------------------------------

右键你的表-->设计表-->找到你的id字段(类int型)-->标识-->是-->标识种子(初始值)-->标识递增量-->OK
---------------------------------------------------------------

用IDENTITY (SEED,INCREMENT)参数,
seed -启始值
increment-增量

---------------------------------------------------------------

CREATE TABLE 表名(
你的ID IDENTITY (1, 1) NOT NULL ,你的其他字段
)

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus