我想对 Oracle DB 中的两个表进行减号操作。第一个表是 Chart_Year,其中包含 trackPosition、trackArtist、trackName、previewLink。另一个表是 Recommendation,其中只有 trackArtist、trackName、previewLink。我希望按 trackPosition 订购决赛桌。我这样做的方式是通过 trackArtist 订购:
SELECT trackartist, trackname, previewlink
FROM
(
SELECT
trackposition, trackartist, trackname, previewlink
FROM
chart_year
WHERE
chartsYear between 2004 and 2008
ORDER BY trackposition ASC
)
MINUS
SELECT
trackartist, trackname, previewlink
FROM
recommendation
WHERE
user = 'bla'
也许我可以做类似的事情
SELECT
1 as trackPosition, trackartist, trackname, previewlink
FROM
recommendation...
?