create table tabname(col1 type1 [not null] [primary key],col2 type2 [not null],..) 怎么样控制长度呀?
急,请高手明示

解决方案 »

  1.   

    create table tb (name varchar(50),...)
      

  2.   

    create table tabname(col1 type1 [not null] [primary key],col2 type2 [not null],..) 是字符型才能弄长度的
      

  3.   


    col1 type1 [not null] [primary key]这四个分别表示什么?
      

  4.   


    col1 列名,type1  类型 ,[not null] 该列不能为空,[primary key] 该列是主键
      

  5.   

    具体得看数据类型吧 nvarchar(50),有的就没法指定长度呀!int(4)这是错的
      

  6.   

    除了 varchar,char,nvarchar,nchar这四个以外,其它都不能指定长度。