首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

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

2012-02-23 
建表时数据类型定义的问题Use mydbCreate table student(Studentno,smallint(6),Studentname, char(20),De

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

热点排行
Bad Request.