我有两个表:MySQL的选择的东西
Article
-article_id
-name
-price
Attributes
-attribute_id
-article_id
-name
-value
我要选择一切从每一篇文章,如果名称为“色”的属性存在,我想选得过这个值。 这样一个例子结果如下:
Result_table
article_id; name; price; value
1; thing1; 24$;
2; thing2; 20$; red
3; thing3; 10$; blue
4; thing4; 19$;
见https://meta.stackoverflow.com/questions/333952/why-should-i-provide-an-mcve-for-what-seems-to-me-to-be-a-very -simple-sql-query – Strawberry