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.
我想比较具有相同主键的 2 个表。例如:
表 A: -------- ID, Oder_ID 表 B: -------- 标识,价值
选择 ID,Oder_ID 从Table A哪里Oder_ID= $d[1];
Table A
Oder_ID
JOIN两张桌子,
JOIN
SELECT b.* -- will give you all the columns from TableB FROM TableA a INNER JOIN tableB b ON a.ID = b.ID WHERE a.Order_ID = $d[1];
要进一步了解有关联接的更多信息,请访问以下链接: