当前位置: 代码迷 >> Sql Server >> 建表时数据类型定义的有关问题
  详细解决方案

建表时数据类型定义的有关问题

热度:34   发布时间:2016-04-27 14:48:18.0
建表时数据类型定义的问题
Use mydb
Create table student
(
Studentno, smallint(6),
Studentname, char(20),
Dept, text(30),
Age, bit(1,0)
Course text(20)
)
go

我bit和text类型不会定义,这个语句错在哪里?能给个正确答案吗?

------解决方案--------------------
SQL code
Create table student(Studentno, smallint(6),Studentname, char(20),Dept, text, --text、bit、datetime、int类型都不需要指定长度Age, bit,Course text(20))
  相关解决方案