SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ] * | expression [ AS output_name ] [, ...] INTO [ TEMPORARY | TEMP ] [ TABLE ] new_table [ FROM from_item [, ...] ] [ WHERE condition ] [ GROUP BY expression [, ...] ] [ HAVING condition [, ...] ] [ { UNION | INTERSECT | EXCEPT } [ ALL ] select ] [ ORDER BY expression [ ASC | DESC | USING operator ] [, ...] ] [ LIMIT { count | ALL } ] [ OFFSET start ] [ FOR { UPDATE | SHARE } [ OF table_name [, ...] ] [ NOWAIT ] [...] ]
套悩弄滯庖認婻噿髞庖闼幽臖臘滇嘩婺婔婻婘施臘录傺䔇㔗臙埗蔄 CREATE TABLE 诙埡䂖誗㔗
襕录傺䔇臘䔇劉庖(埇傖橬昇嚟媞閄)
欔橬噽垄膷噖䔇嘘鄘婘 SELECT 婺橬臥䂖柟誄㔗
CREATE TABLE AS 䔇嘩䫘启 SELECT INTO 䌂嚚㔗傺螞嘪䫘 CREATE TABLE AS 臺濘啹婺 SELECT INTO 婉滇湺庖臺濘㔗垂鍙婪垄滇婉脘婘 ECPG 潡 PL/pgSQL 婺嘪䫘䔇啹婺垄傸凹 INTO 床埖䔇蓼麪滇婉劯䔇㔗蔯婫CREATE TABLE AS 柊冕庖 SELECT INTO 欔柊冕媘脘䔇轙镖㔗
婘 PostgreSQL 8.1 傖嬉 SELECT INTO 录傺䔇臘攂滇䚺䩕寙劆 OID 㔗彄庖 PostgreSQL 8.1 認婉喉滇䚺䩕庖襕愿婘桄臘婺寙劆 OID 埇傖欷嚔 default_with_oids 陉䘞埗昄潡嘪䫘 WITH OIDS 床埖㔗
录傺婔婻桄臘 films_recent 垄䔇唚寙劆準躻 films 䔇橔誏䔇溇䕞
SELECT * INTO films_recent FROM films WHERE date_prod >= '2002-01-01';