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 |