0
顯示另一個表的最大ID我有兩個不同的表檢索ID爲兩個表中的數據,並在MySQL
Table 1
id
name
description
Table 2
id
details
info
table1_id
我想要顯示從table1
的所有記錄,除了id
但是從table2
我用顯示最大id
。
例如。 table1
有以下記錄
id=1
name = test
description = some text
table2 have
id=5
details = some more text
info = the new info
table1_id = 1
所以我想要的結果是
id name description
5 test some text