摘要: Exists,NOT EXISTS:1.含义:带有exists谓词的子查询不返回任何实际数据,它只产生逻辑真值true或逻辑假值false。2.查询所有选修了c1号课程的学生姓名: select sn from s where exists (select * from sc where sno=s.sno and cno='c1')注:若内查询结果(select * from sc where sno=s.sno and cno='c1')为空,则外层的where子句返回真值,否则返回假值!查询过程:步骤一:从外层查询中的s表的第一个元组,根据它,与内层查询相 阅读全文
posted @ 2012-02-02 21:57 偶不是大叔 阅读(6458) 评论(1) 推荐(0)