T-SQL 101: 121 Using VALUES Clauses as Row Constructors in SQL Server T-SQL
SQL Server 2008 and later support a VALUES clause. We can use this to construct a table on the fly.
In the example above, you can pretty much ignore the outer query as I just put it there to select from the table that was derived in the VALUES clause.
With VALUES, I put a list of rows that I want to include. They each must have the same number of columns.
2025-02-26