How do I 'subtract' sql tables?

后端 未结 14 2016
死守一世寂寞
死守一世寂寞 2020-12-05 13:12

Its not really a subtraction I\'m looking for. And I know its not a union or intersection... I have been given a long and complex stored procedure that returns a table of

14条回答
  •  星月不相逢
    2020-12-05 13:55

    SELECT roll_number FROM profile WHERE(catagory='Attest and Eat' or catagory='Live and Eat') and status='OK' EXCEPT SELECT roll_number from meal_status  WHERE date='29' AND month='1'
    

    You can try this kind of command to subtract a table from another one.

提交回复
热议问题