我有查詢象下面這樣:合併兩個SQL查詢結果爲一個結果
SELECT COUNT(*) AS AppleSupports
FROM VendorItemPricing
WHERE VendorName = 'Apple'
SELECT COUNT(*) AS HpSupports
FROM VendorItemPricing
WHERE VendorName = 'HP'
上面的查詢給我結果如下圖所示:
AppleSupports
63
HpSupports
387
怎樣才能讓我的查詢來獲取一行結果像下面一樣?你的SELECT語句裏面
AppleSupports HpSupports
63 387