我也初学者  学到多条查询很苦恼,请问大家有什么好的渠道学好 查询, 我需要是 in   exists   any all   嵌套子查询   和多表连接  我总是写混乱
前辈们 讲解一下  摆脱了

解决方案 »

  1.   

    select distinct employeeid from orders where orderid in ( select orderid from orderdetails where discount >= 10)
      

  2.   

    select custID from orders where regionID != "E" and discount > any (select discount from orders where regionID = "E" and discount > 3) 
      

  3.   

    select pub.name from publishers pub where exists (select pubid from titles where titles.pubid = pub.pubid and toLowerCase(titles.subject) like "%psychology%");