One last SQL syntax post for the evening…

We've all heard about SQL Server 2008 row constructors. They allow syntax like this to work:

CREATE TABLE name_table (name varchar(20), age int);
INSERT INTO name_table VALUES ('Bob', 54), ('Mary', 30), ('Sam', 15), ('Buddy', 9);

But how about using them as a table source:

SELECT, n.age, tab.species
FROM name_table n
  VALUES ('Bob', 'person'), ('Mary', 'person'), ('Sam', 'cat'), ('Buddy', 'cat')
) tab (name, species)
ON =;

You specify a table alias and name the columns, and its just another (synthesized on the fly) table.