create table test
(id bigint identity(1,1))

解决方案 »

  1.   

    create table test(a int identity(1,1),..)
    根据选择的字段类型
      

  2.   

    IDENTITY(属性)
    在表中创建一个标识列。该属性与 CREATE TABLE 及 ALTER TABLE Transact-SQL 语句一起使用。说明  IDENTITY 属性与 SQL-DMO Identity 属性不同,后者表现列的行标识属性。 语法
    IDENTITY [ ( seed , increment ) ]参数
    seed装载到表中的第一个行所使用的值。increment增量值,该值被添加到前一个已装载的行的标识值上。必须同时指定种子和增量,或者二者都不指定。如果二者都未指定,则取默认值 (1,1)。
      

  3.   

    create table table1(id bigint(1,1)not null,...)
      

  4.   

    晕,该吃饭去了!
    create table table1(id bigint identity(1,1)not null,...)
      

  5.   

    字段 bigint IDENTITY(1,1)
      

  6.   

    在查询分析器里执行就行
    create table test
    (id bigint identity(1,1))
    你也可以在企业管理器中创建表,然后设置它的标识属性。。
      

  7.   

    1.两种方法:sql语句,企业管理器中创建表
    2.
    bigint:从-9223372036854775808到9223372036854775808,8个字节
    int:从-2147483648到2147483648,4个字节
    smallint:从-32768到32768,2个字节
    tinyint:从0到255,1个字节没了,吃饭,结账!
      

  8.   

    create table tablename (id_num bigint IDENTITY(1,1),name char(10))