Mysql select where not in table

前端 未结 5 1701
离开以前
离开以前 2020-11-29 21:46

I have 2 tables (A and B) with the same primary keys. I want to select all row that are in A and not in B. The following works:

select * from A where not exi         


        
5条回答
  •  星月不相逢
    2020-11-29 21:57

    I use queries in the format of your second example. A join is usually more scalable than a correlated subquery.

提交回复
热议问题