数据库表的结构如下:
customer: custkey name comment
lineitem:orderkey partkey comment
orders:orderkey custkey
part: partkey name
请问如何用双层 exists 嵌套查询至少购买过顾客“齐光远”购买过的全部零件的顾客姓名。
数据库mysql语言的嵌套查询问题
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
3条回答 默认 最新
Kyle_Ping 2022-10-26 13:37关注select name from customer where custkey exists (select custkey from orders where orderkey exists (select custkey from customer where name = '齐光远'))本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报 编辑记录