日期:2014-05-18  浏览次数:20400 次

建表时数据类型定义的问题
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)
)