SQL语言中没有蕴函逻辑运算,利用谓词演算转换为:
p®q ÛØp∨q
关系式不太好打了就掠过了
select distinct cno
from Course
where not exists
(
select *
from Student,sc
where Student.sname like '王%'
and sc.sno=student.sno
and course.cno=student.cno
)
这个很久没写了如果错了请见谅。
exists 里面貌似不能用select * 吧,要明确一个字段。
什么问题,这俩速度都很快 不要用not 就好