数据库原理里面的一题作业,求出没有通过代理商的客户信息,
select cid,aid from customers c,agents a
where not exists (select * from orders x
where x.cid=c.cid and x.aid=a.aid);
能否用not in和子查询代替not exists?
select cid,aid from customers c,agents a
where not exists (select * from orders x
where x.cid=c.cid and x.aid=a.aid);
能否用not in和子查询代替not exists?
解决方案 »
- 关于SQLite的查询操作
- MySql 3.51下求一个查询
- 如何在一台电脑查询另一台电脑数据库的表信息,局域内MySql
- mysql 改个函数
- mysql5有没有什么工具或者好的办法同步一个数据库到另一个数据库,两个数据库的结构有点差异
- mysql问题!昨天有人责怪我对高手大呼小叫的!今天就低调一点!
- winxp下mysql数据库启动问题。。。。。。。。。。。。。。。。。。。。。。。。。。。。
- sqlserver中的varchar字段插入到mysql的text中不成功
- 急!!MySQL外键表名大小写敏感问题
- 一个奇怪的sql问题?
- postgreSQL使用delete删除多个表
- mysql 表内的数据乱码
where (cid,aid) not in (select cid,aid from orders x);[align=center]==== 思想重于技巧 ====
[/align]