7.7. VALUES 列舉資料
VALUES ( expression [, ...] ) [, ...]VALUES (1, 'one'), (2, 'two'), (3, 'three');SELECT 1 AS column1, 'one' AS column2
UNION ALL
SELECT 2, 'two'
UNION ALL
SELECT 3, 'three';=> SELECT * FROM (VALUES (1, 'one'), (2, 'two'), (3, 'three')) AS t (num,letter);
num | letter
-----+--------
1 | one
2 | two
3 | three
(3 rows)Last updated