SQL 2000编程题 重金~

[复制链接]
查看11 | 回复0 | 2010-4-13 09:23:35 | 显示全部楼层 |阅读模式
1.create table student(id int identity(1,1) primary key,name char(10))create table scores(id int foreign key references student(id),score int)2.select score from student,scores where student.id = scores.id and student.name = 'Tom'3.select top 1 name from student,scores where student.id = scores.id order by score desc4.select top 3 name,score from student,scores where student.id = scores.id order by score desc5.select name,score from student left join scores on student.id = scores.id6.update scores set score = 80 where id = (select id from student where name = 'Tom')7.alter table student add score intupdate student set score = (select score from scores where scores.id = student.id)8.delete from scores where id = (select id from student where name='Tom')9.delete from scores where id = (select top 1 id from scores order by score desc)10.select id,name,score into student_scores from student where score > 80回答人的补充 2009-11-11 12:53 10.select student.id,student.name,scores.score into student_scores from student,scores where student.id = scores.id and scores.score > 80
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行