1、用T-SQL语句创建一个如下图所示的数据表,表名为Students,建在名为TestDB的数据库中:

1、用T-SQL语句创建一个如下图所示的数据表,表名为Students,建在名为TestDB的数据库中:
列名 数据类型及长度 是否为空 备注
学号 CHAR(8) NO 主键
姓名 CHAR(10) NO
系别 CHAR(20) NO 默认值为”计算机系”
2、为上表中插入两条数据(数据由考生模拟)
3、将上面的表Students中插入一个“出生年月”字段,数据类型为datetime
4、将Students表中所有学号以“03J”开头的学生的系别改为“经管系”
5、删除Students表中所有‘1978-12-3’以前出生的学生信息。

第1个回答  2012-01-02
select sum(score) as 分数总和
from 表
where type=11
感觉意思不是很全,所以觉得是很简单的事情,不知道能不能帮到你本回答被提问者采纳
第2个回答  推荐于2018-03-04
use testdb go 1.create table student(学号 char(8)not null primary key,姓名 char(10)not null,系别 char(20)not null default '计算机系') 2.insert into student values('03j1111','张三') insert into student values('02j1111','李四') 3.alter table student add 出生年月 datetime 4.update student set 系别='经管系' where 学号 like'03j%' 5.delete from student where 出生年月<'1978-12-3'
本回答被网友采纳
相似回答