SQL数据库查询exists和in的用法问题

2025-02-26 09:38:46
推荐回答(3个)
回答1:

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
)

这个很久没写了如果错了请见谅。

回答2:

exists 里面貌似不能用select * 吧,要明确一个字段。

回答3:

什么问题,这俩速度都很快 不要用not 就好