ユニオンクエリとリテラルを使用する:
SELECT ID, Name, 'iamfromTABLE1' as indicator, Year
FROM Table1
UNION
SELECT ID, Name, 'iamfromTABLE2' as indicator, Year
FROM Table2
ORDER BY Year
編集:as indicator
iim.hlkの推奨に追加
ユニオンクエリとリテラルを使用する:
SELECT ID, Name, 'iamfromTABLE1' as indicator, Year
FROM Table1
UNION
SELECT ID, Name, 'iamfromTABLE2' as indicator, Year
FROM Table2
ORDER BY Year
編集:as indicator
iim.hlkの推奨に追加