Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个 JOIN 声明
$data = mysql_query("SELECT * FROM table a JOIN db.table2 b ON a.e_id = b.e_id WHERE amount='5' ");
从“table”中选择所有列,但我需要做的是保留“table”的全选,并且只在结果中包含“table2”中的两列。
"SELECT a.*,b.column1,b.column2 FROM table1 a JOIN table2 b ON a.e_id = b.e_id WHERE amount='5'"
只需将“column1”和“column2”替换为您需要拉入的字段