我有以下查詢,這給了我一個給定標題的提供商空的結果:排除在UNION查詢
SELECT DISTINCT(provider) FROM
(SELECT title, provider FROM financials_raw
UNION
SELECT title, provider from sales_raw
) combined
WHERE title = 'Home'
然而,這將返回NULL提供商結果以及如何將我排除所有空結果如何?
'WHERE title ='Home'AND provider IS NOT NULL'? – eggyal
贊同@eggyal – MikeTWebb
是的,並刪除括號,'distinct(x)'與'distinct x'' – Andomar