select order_num from orderitems where prod_id = 'tnt2';
select cust_id from orders where order_num in ('20005','20007');
等价于
select cust_id from orders where order_num in ( select order_num from orderitems where prod_id = 'tnt2');
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 = 'tnt2'));
网友评论