Press "Enter" to skip to content

The VALUES Operator in T-SQL

Chris Johnson shows off using the VALUES operator to construct records:

Values blocks are a really useful little bit of code in SQL Server. Basically, they are a block of defined values that you can use pretty much like any other data set.

It’s a nice way quickly to build a derived table. As a bonus, I’ll tie in an older post of mine around using APPLY with VALUES to unpivot data sets.