我想這一點,和它的作品,如何篩選出空值相比較,則甲骨文
SELECT name
FROM
(SELECT name,LENGTH FROM river WHERE LENGTH IS NOT NULL
)
WHERE LENGTH >= ALL
(SELECT LENGTH FROM
(SELECT name,LENGTH FROM river WHERE LENGTH IS NOT NULL
)
)
但我的最終代碼會是這樣的:
SELECT a.name,
a.length
FROM
(SELECT name,LENGTH FROM river WHERE LENGTH IS NOT NULL
) a,
geo_river b,
encompasses c
WHERE a.length >= ALL
(SELECT a2.LENGTH
FROM
(SELECT name,LENGTH FROM river WHERE LENGTH IS NOT NULL
) a2
)
AND a.name = b.river
AND b.country = c.country
AND c.continent = 'America'
這真的很複雜。 有一種簡單的方法,讓
(SELECT name,LENGTH FROM river WHERE LENGTH IS NOT NULL)
是河流,所以我並不需要用這個
(SELECT name,LENGTH FROM river WHERE LENGTH IS NOT NULL)
兩次。
很好的解決,謝謝! – user92322