How to create a temporary table using VALUES in …
https://dba.stackexchange.com/questions/86724/how-to-create-a-temporary-table-using-values-in-postgresql
create table as needs a select statement: DROP TABLE IF EXISTS lookup; CREATE TEMP TABLE lookup as select * from ( VALUES (0::int,-99999::numeric), (1::int, 100::numeric) ) as t (key, value); You can also re-write this to use a CTE: create temp table lookup as with t (key, value) as ( values (0::int,-99999::numeric), (1::int,100::numeric) ) select * from t;
DA: 41 PA: 71 MOZ Rank: 16