发表于 2008-11-23 12:58:44 楼主 | |
【求助】数据库问题
|
|
个性签名:无
|
发表于 2008-11-23 14:16:10 1楼 | |
1、创建表 create table student( 学号 char(20) not null, 姓名 char(10) null, 性别 char(2) null, 年龄 int null, 所在系 char(20) null, 专业 char(20) null, constraint PK_学号 primary key clustered (学号) ) 2、插入记录 insert into student values("20040115","王五","男",20,"IS","computer") 3、更改学号 update student set 学号="20040210" where 学号="20040115" 4、查询记录 select * from student where 所在系="IS" order by 学号 asc 5、关键字(码):在元组属性中能唯一标识一条不重复记录的属性。选择作为主键的属性称为主码,其它称为候选码。 |
|
针对ZOL星空(中国)您有任何使用问题和建议 您可以 联系星空(中国)管理员 、 查看帮助 或 给我提意见