第十一课 使用子查询
11.1 利用子查询进行过滤
子查询从内到外执行,作为子查询的 SELECT 语句只能查询单个列。
select cust_name,cust_contact from customers where cust_id in (select cust_id from orders where order_num in (SELECT order_num FROM OrderItems WHERE prod_id = 'RGAN01'))
子查询经常用于where语句的in中搭配使用