Sqlserver
 sql >> Datenbank >  >> RDS >> Sqlserver

Der effizienteste Weg, um Zeilenrückgaben von Union-Abfragen zu begrenzen – TSQL

WITH Results (Result)
AS
(

select name as 'result'
from product
where...

union

select productNum as 'result'
from product
where...
)

SELECT TOP 10 * FROM Results

Allgemeiner Tabellenausdruck