create table mytest
(INT_ID int Identity(1,1) not null)

解决方案 »

  1.   

    哈哈,sql中的序列不oracle简单多了,他不是单独的一种对象而是一种数据类型对象,也就是自增字段。和mysql、access中一样。
    字需要设置一个int类型的字段的属性为标识别就可以了
      

  2.   

    補充:實際上可設為identity屬性的字段不僅僅是int類型的。
    請看征征微軟的說明:
    Identity column 'id_num' must be of data type int, bigint, smallint, tinyint, or decimal or numeric with a scale of 0, and constrained to be nonnullable.