读书人

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

发布时间: 2012-02-23 22:01:36 作者: rapoo

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

读书人网 >SQL Server

热点推荐