试图做不在的地方

时间:2018-10-11 18:29:15

标签: mysql database

select purchase_orders.purchase_order_id, order_date, department_id
from purchase_orders
join purchase_order_lines
    on purchase_orders.purchase_order_id = purchase_order_lines.purchase_order_id
where not exists (select purchase_orders.purchase_order_id = purchase_order_lines.purchase_order_id); 

我试图确保它仅显示不属于采购订单行的采购订单。我不断收到错误消息,我不确定如何使其工作。任何帮助都会很棒。

0 个答案:

没有答案