sql查询语句

时间:2017-06-27 14:27:11
【文件属性】:
文件名称:sql查询语句
文件大小:37KB
文件格式:DOC
更新时间:2017-06-27 14:27:11
sql查询 sql查询语句,带有实例,除法等应用 select sc.* from sc where not exists( select cno from c where( sc.cno!='c1' and sc.cno!='c2' ) ) --其中not exists 中的 select cno from c where 是没有用的 --等价于 select sc.* from sc where cno not in( select cno from c where( sc.cno!='c1' and sc.cno!='c2' ) ) --等价于 select sc.* from sc where cno in('c1','c2') ------------------------------ select sc.* from sc where not exists( select cno from c where( cno!='c1' and cno!='c2') )

网友评论