SQL SELECT Statische Werte

ID244
Link ReferenceNot set
Link CreditsNot set
Link Technical DocumentationNot set
PlCodelangT-SQL
PlGroupDatenbank
PlItemTitleSQL SELECT Statische Werte
CodeSELECT
*
FROM (
VALUES
(1, 2),
(3, 4)
) AS q (col1, col2)
GO

-- the same as:
SELECT 1 AS col1, 2 AS col2 UNION ALL
SELECT 3 AS col1, 4 AS col2
GO

-- col1 | col2
-- ===========
-- 1 | 2
-- -----------
-- 3 | 4

Result Example