0
table 'sales'
id refid invoice itemid price
1 001 1501 ss01 12000
table 'purchase'
id itemid price
1 ss01 10200
table 'reference'
id refid refname
1 001 bedul
我有這樣的三代表在我的SQL數據庫,所以如何讓他們變成一個表像下面使用MySQL查詢:mysql - 數據收集多表?
table
id refid refname invoice itemid sellprice buyprice profit
1 001 bedul 1501 ss01 12000 10200 1800
^h如果我試圖在'refname'搜索結果上做出相同的結果基礎,我應該怎麼做? –
您可以添加'where'條款..... – Viandry