左连接IS NULL

时间:2015-01-14 10:21:40

标签: mysql

是否有可能使用IS NULL和另一个变量进行过滤?

table1.id | table1.product | table2.product_id | table2.attribute_id 1 | Product 1 | 1 | 1 1 | Product 1 | 1 | NULL 1 | Product 1 | 1 | 3 2 | Product 2 | 2 | NULL 2 | Product 2 | 2 | 2 2 | Product 2 | 2 | 3 3 | Product 3 | 3 | 1 3 | Product 3 | 3 | 2 3 | Product 3 | 3 | NULL

所以,我想过滤没有attribute_id 1和2的产品。

0 个答案:

没有答案