這一語句將產生一個4列的表的總和:我如何獲得第四列的
SELECT shipped.badguy AS badguy, shipped.sdate AS LineDate,
'Delivery' AS Legend, -price*quantity AS amount
FROM product JOIN shipped ON (product.id = shipped.product)
UNION
SELECT receipt.badguy, receipt.rdate,notes, amount
FROM receipt
如何獲得上述產生什麼樣的列第4的總和?
哪個數據庫? – 2010-03-16 21:48:25
您的查詢似乎不完整。 – 2010-03-16 21:49:30