Table value constructor
builds rows inline (VALUES)
What changes
- Input
- literals, variables, expressions
- Output or change
- literal rowset
Syntax at a glance
VALUES ( <row value expression list> ) [ ,...n ]
Work example
You need a tiny fixed rowset for a demo, lookup, or isolated query without creating a table.
Run the sample and label every column. Keep each value position on the same compatible data type.
Check your work Table value constructor. Two rows appear with the labels alpha and beta. The query creates no database object.
Practice SQL
Open in SQL FlowSELECT Code, Label
FROM (VALUES (1, N'alpha'), (2, N'beta')) AS Items(Code, Label);
Open Microsoft Learn for full syntax, permissions, and details for your version.