From 58617e4dc131561f4b6ba492d6a404b05bd0b968 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 6 Jun 2013 21:03:04 -0400 Subject: [PATCH] doc: Clarify description of VALUES command Greg Smith --- doc/src/sgml/queries.sgml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgml index d7b0d731b9..c32c857651 100644 --- a/doc/src/sgml/queries.sgml +++ b/doc/src/sgml/queries.sgml @@ -1609,7 +1609,16 @@ SELECT 3, 'three'; VALUES table. The column names are not specified by the SQL standard and different database systems do it differently, so it's usually better to override the default names with a table alias - list. + list, like this: + +=> SELECT * FROM (VALUES (1, 'one'), (2, 'two'), (3, 'three')) AS t (num,letter); + num | letter +-----+-------- + 1 | one + 2 | two + 3 | three +(3 rows) + -- 2.40.0