Name for SELECT * FROM (VALUES (x,y)) AS TableLiteral(Col1, Col2)

Viewed 2762

The following is valid SQL syntax:

SELECT *
    FROM (VALUES ('p','q'),('x','y')) AS TableLiteral(Col1, Col2)

and returns the table:

  | Col1 | Col2
----------------
1 |  p   |  q
2 |  x   |  y

This syntax can further be used in CTEs etc.

Is there a name for this? I've been calling them "TableLiterals" by analogy with string literals and regex literals.

Is there a term that will be widely recognised.

2 Answers
Related