![](/img/trans.png)
[英]How can I select two different values from another table using only a single query?
[英]mysql :How to select two different column values from a single table using two different values of another table
我的目標是在單個查詢中使用table1的字段a和b從table2中選擇兩個不同的值,例如c&d。
任何幫助將不勝感激。
謝謝。
SELECT table2.c, table2.d
FROM table2
JOIN table1 ON table2.some_common_field = table1.other_common_field
WHERE (table1.a = XXX) AND (table1.b = YYY)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.