在求!高手!
现需创建一个学生信息表,他由以下字段组成:学号(C,10)姓名(C,8)性别(C,10)班级名(C,10)系别代号(C,2)地址(C,50)出生年月(D)是否团员(L)备注(M)照片(G)请写出实现上述操作的SQL语句!
参考答案:/*==============================================================*/
/* Database name: PhysicalDataModel_1 */
/* DBMS name: Microsoft SQL Server 2000 */
/* Created on: 2005-12-26 11:10:37 */
/*==============================================================*/
if exists (select 1
from sysobjects
where id = object_id('studentInfo')
and type = 'U')
drop table studentInfo
go
/*==============================================================*/
/* Table: studentInfo */
/*==============================================================*/
create table studentInfo (
ID int not null,
studentNumber varchar(10) null,
studentName varchar(10) null,
sex char(4) null,
gradeName varchar(10) null,
departmentCode varchar(10) null,
address varchar(50) null,
birthday datetime null,
ifMember int null,
memo varchar(200) null,
photo image null,
constraint PK_STUDENTINFO primary key (ID)
)
go