【PostgreSQL】 Cheat sheet

PostgreSQL Cheat sheet

列出所有table

SELECT table_name FROM information_schema.tables WHERE table_schema='public' AND table_type='BASE TABLE';

將SELECT 的結果存入新的資料表

SELECT "Column1" INTO TABLE "NewTable" FROM "Table1";