多表查询,内连接查询和多表联查区别

多个表一起查询 可以使用连接查询,也可以 利用where  and  实现 

多表联查  

select 字段1,2,3 from 表A,B,C,D where 条件1 and 2 and 3..

 Select S#,Sname from (select Student.S#,Student.Sname,score ,(select score from SC SC_2 where SC_2.S#=Student.S# and SC_2.C#='002') score2
  from Student,SC where Student.S#=SC.S# and C#='001') S_2 where score2 <score;

 

posted @ 2016-05-13 20:36  小司机  阅读(1139)  评论(0编辑  收藏  举报