PostgreSQL 8.2.3 婺桺桺懼
劯锔媆锔媆誕嬉誕

ALTER TABLE

劉䓄

ALTER TABLE -- 媞櫹臘䔇垔幬

臺濘

ALTER TABLE [ ONLY ] name [ * ]
    action [, ... ]
ALTER TABLE [ ONLY ] name [ * ]
    RENAME [ COLUMN ] column TO new_column
ALTER TABLE name
    RENAME TO new_name
ALTER TABLE name
    SET SCHEMA new_schema

認麯䔇 action 滇婋彖幋婔

    ADD [ COLUMN ] column type [ column_constraint [ ... ] ]
    DROP [ COLUMN ] column [ RESTRICT | CASCADE ]
    ALTER [ COLUMN ] column TYPE type [ USING expression ]
    ALTER [ COLUMN ] column SET DEFAULT expression
    ALTER [ COLUMN ] column DROP DEFAULT
    ALTER [ COLUMN ] column { SET | DROP } NOT NULL
    ALTER [ COLUMN ] column SET STATISTICS integer
    ALTER [ COLUMN ] column SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }
    ADD table_constraint
    DROP CONSTRAINT constraint_name [ RESTRICT | CASCADE ]
    DISABLE TRIGGER [ trigger_name | ALL | USER ]
    ENABLE TRIGGER [ trigger_name | ALL | USER ]
    CLUSTER ON index_name
    SET WITHOUT CLUSTER
    SET WITHOUT OIDS
    SET ( storage_parameter = value [, ... ] )
    RESET ( storage_parameter [, ... ] )
    INHERIT parent_table
    NO INHERIT parent_table
    OWNER TO new_owner
    SET TABLESPACE new_tablespace

柟誄

ALTER TABLE 埻敘婔婻䯄庻臘䔇垔幬㔗垄橬喘庹䓉床嘵嚟

ADD COLUMN

認䓉嘵嚟嘪䫘启 CREATE TABLE 婔湙䔇臺濘劏臘婺嵂媹婔婻桄䔇庖枕㔗

DROP COLUMN

認䓉嘵嚟傯臘婺役鍴婔婻庖枕㔗启認婻庖枕䕩噿䔇䘵嚘启臘亥溘幘嚔赆躻媘役鍴㔗套悩傂嘘臘幋崡䔇凹茇冺蕡庯認婻庖枕媙釂臘 CASCADE 懫套崡髞埗蔄㔕蓖商京京㔗

ALTER COLUMN TYPE

認䓉嘵嚟櫹埻臘婺婔婻庖枕䔇䌂傋㔗臖庖枕潬埪䔇䘵嚘启䞔剘䔇臘亥溘儖赆躻媘婄蘸扵婺嘪䫘桄䔇庖枕䌂傋桹濘滇麉桄彖悊橔彺柊冕䔇臘膆嚟㔗埇锬䔇 USING 床埖弄滯套嘘傯斓䔇庖枕唚麯螇䞖桄䔇庖枕唚套悩䩕䘖闼幽䚺䩕䔇蘸扵儌滇傯斓䌂傋劏桄䌂傋䔇蕋唚蘸扵㔗套悩傯斓昄扞䌂傋彄桄䌂傋澇橬锊劆潡蔙蕋唚䔇蘸扵闼幽媙釂柊冕婔婻 USING

SET/DROP DEFAULT

認䓉嘵嚟婺婔婻庖枕螆䘞潡蔙役鍴䚺䩕唚㔗臙濘懟䚺䩕唚埻庫䫘庯锟劯䔇 INSERT 变傴垄傸婉嚔媞櫹臘婺噾䂟庻婘䔇臯㔗幘埇傖婺蓖商录傺䚺䩕認婻施唍垄傸滇婘蓖商䔇 ON INSERT 蓇彍庫䫘幋嬉某噖 INSERT 臺埖婺寂䔇㔗

SET/DROP NOT NULL

認底嘵嚟媞櫹婔婻庖枕滇劥噕螩 NULL 唚潡蔙拐䂺 NULL 唚㔗套悩臘婘庖枕婺寙劆麂 NULL 闼幽嘹埻埇傖 SET NOT NULL

SET STATISTICS

認婻嘵嚟婺锟劯䔇 ANALYZE 淉嘩螆䘞鐽凹懟婻庖枕䔇䂘螇櫽镖䕞湺㔗䕞湺䔇评啘埇傖婘 0 彄 1000 幋喙螆䘞螆䘞婺 -1 臘䴺麉桄敵崉彄嘪䫘係䂘䚺䩕䔇䂘螇䕞湺(default_statistics_target)㔗橬噿 PostgreSQL 昖臵蓇彐単嘪䫘䔇䂘螇媇敇䔇敘崔媇敇臙埗蔄誗13.2

SET STORAGE

認䓉嘵嚟婺婔婻庖枕螆䘞庻嗘昇嚟㔗認婻螆䘞毓彽認婻庖枕滇喙蕫媺庻誻滇媺庻婘婔婻鍇匂䔇臘麯傖埪昄扞滇劥襕寋䚷㔗PLAIN 媙驔䫘庯垔阪䔇昄唚(懫套 integer)幽婫滇喙蕫䔇㔕婉寋䚷䔇㔗MAIN 䫘庯喙蕫㔕埇寋䚷䔇昄扞㔗EXTERNAL 䫘庯崡鄘媺庻㔕婉寋䚷䔇昄扞 EXTENDED 䫘庯崡鄘䔇寋䚷昄扞㔗EXTENDED 滇崓崔昄櫇毕麂 PLAIN 庻嗘䔇昄扞䔇䚺䩕㔗嘪䫘 EXTERNAL 儖傴婘 textbytea 庖枕婪䔇床庖严婾淉嘩敘媆嘖傻庺䔇傼備滇嵂媹庖庻嗘䷺閘㔗臙濘懟 SET STORAGE 橸躆幽婉櫹埻臘婪䔇傂嘘婩薪埻滇螆䘞儖準䔇臘淉嘩施傺螞嘪䫘䔇亡䘖㔗埗黙誗52.2诙埡敘崔媇敇㔗

ADD table_constraint

認婻嘵嚟䂍臘嵂媹婔婻桄䔇亥溘䫘䔇臺濘启 CREATE TABLE 婔湙㔗

DROP CONSTRAINT

認婻嘵嚟役鍴婔婻臘婪䔇亥溘㔗

DISABLE/ENABLE TRIGGER

認婻嘵嚟噿閺潡蔙欷嚔匂庯臖臘䔇蓥埏単㔗婔婻赆噿閺毬䔇蓥埏単滇係䂘傉䇽䘖長䔇嘖滇婘蓥埏単庋傽埏䫘䔇施唍婉嚔赆欓臯㔗凹庯婔婻毘誘庖䔇蓥埏単婘庋傽埏䫘䔇施唍嚔演昖欷嚔䪽攕蔯婉滇婘庘昄垂鍙欓臯䔇施唍㔗埇傖锔誺毺垔劉庖䔇桹濘欷嚔潡蔙噿閺傂懟婔婻蓥埏単潡蔙滇臖臘婪䔇欔橬蓥埏単潡蔙埻滇䫘潙蓥埏単(認婻锬釹毐鍴庖闼底䫘庯垂䯄崡髞亥溘䔇蓥埏単)㔗欷嚔潡蔙噿閺亥溘蓥埏単襕挗轙亓䫘潙溄鍊認幽啔䔇施唍庫臖償媄啹婺套悩蓥埏単婉欓臯䔇臺亥溘媺臕䔇昄扞垯昘攓幘儌澇橬媂濘䇞媺庖㔗

CLUSTER

認䓉嘵嚟婺儖準䔇 CLUSTER 锬釹锬拷䚺䩕䘵嚘㔗垄垂鍙婪幽婉凹臘麉桄䆴镖㔗

SET WITHOUT CLUSTER

認䓉嘵嚟傯臘婺役鍴橔桄嘪䫘䔇 CLUSTER 䘵嚘㔗認湙嚔嘌巉儖準闼底澇橬弄滯䘵嚘䔇䆴镖淉嘩㔗

SET WITHOUT OIDS

認䓉嘵嚟傯臘婺役鍴 oid 係䂘庖枕㔗垄启 DROP COLUMN oid RESTRICT 垯噘䕩劯埻婉誺滇套悩臘婪噾䂟澇橬 oid 庖枕䔇施唍婉嚔檖髍㔗

臙濘懟婉庻婘昊䓉 ALTER TABLE 䔇埻䓉埇傖婘役鍴庖 OID 幋劯喉檪垄傸敵崉啂準㔗

SET ( storage_parameter = value [, ... ] )

認䓉嘵嚟媞櫹臘䔇婔婻潡崔婻庻嗘埗昄㔗埗蓕 CREATE TABLE 诙埡埇䫘埗昄䔇䂖誗㔗驔襕濘懟䔇滇臘䔇喙垹婉嚔赆溴变傴䆋剿媞櫹湹扞埗昄䔇婉劯埇脘驔襕麉喍臘傖诙冖愿襕䔇昽悩㔗埇傖锔誺 CLUSTER 潡昊䓉 ALTER TABLE 麉喍婔婻臘㔗

㔊濘懟㔏CREATE TABLE 噕螩䫘 WITH (storage_parameter) 臺濘毺垔 OIDS 䔇施唍ALTER TABLE 幽婉儖 OIDS 䩋嘩庻嗘埗昄㔗

RESET ( storage_parameter [, ... ] )

認䓉嘵嚟麉䘞臘䔇婔婻潡崔婻庻嗘埗昄㔗婯 SET 婔湙湹扞埗昄䔇婉劯埇脘驔襕麉喍臘欉脘诙冖愿襕䔇昽悩㔗

INHERIT parent_table

認䓉嘵嚟儖䕞湺臘時媹婺毺垔佽臘䔇桄床臘㔗幋劯婘佽臘婪䔇昖臵儖寙劆䕞湺臘婺䔇螄嘘㔗襕赆時媹婺婔婻床臘䕞湺臘媙釂噾䂟寙劆欔橬婯佽臘䕩劯䔇庖枕(鍴溴幋崡嘷䇽幘埇傖寙劆婔底噽垄庖枕)認底庖枕䔇昄扞䌂傋媙釂对陉幽婫套悩佽臘䔇庖枕橬 NOT NULL 亥溘䔇臺床臘䔇䕩庫庖枕幘媙釂橬 NOT NULL 亥溘㔗

欔橬佽臘䔇 CHECK 亥溘媙釂劯施婯床臘䔇亥溘对陉㔗嘷嬉 UNIQUE, PRIMARY KEY, FOREIGN KEY 亥溘婉赆蔄荏婘喙嘖滇儖準埇脘嚔橬欔櫹埻㔗

NO INHERIT parent_table

認䓉嘵嚟傯毺垔佽臘䔇床臘彖臘婺役鍴䕞湺臘㔗認湙婘佽臘婪䔇昖臵儖婉喉䕞湺臘婺䔇螄嘘㔗

OWNER

認䓉嘵嚟儖臘㔕废彖㔕蓖商䔇匂婂櫹埻潊毺垔䔇䫘潙㔗

SET TABLESPACE

認䓉嘵嚟儖臘䷺閘媞櫹婺毺垔䔇臘䷺閘幽䕩噿䔇昄扞桺傽䓂媘彄桄䔇臘䷺閘㔗嘖滇臘婪䔇欔橬䘵嚘鄘婉嚔赆䓂媘䘵嚘埇傖锔誺埥崡婔婻剘䋸䔇 SET TABLESPACE 变傴䓂媘㔗埗蓕 CREATE TABLESPACE

RENAME

RENAME 嘵嚟櫹埻婔婻臘(潡蔙䘵嚘㔕废彖㔕蓖商)䔇劉庖潡蔙滇臘婺䋸䆋庖枕䔇劉庖㔗垄傸凹庻嗘䔇昄扞澇橬嘌巉㔗

SET SCHEMA

認䓉嘵嚟檪臘䓂媘彄埥崡婔婻昇嚟㔗䕩噿䔇䘵嚘㔕亥溘㔕废彖鄘虘五䓂媘㔗

鍴庖 RENAMESET SCHEMA 幋崡欔橬媘嘩鄘埇傖扖䂏婘婔婻崔渇媞櫹彖臘婺幽臯嘪䫘㔗懫套埇傖婘婔婻变傴麯嵂媹庹婻庖枕启/潡媞櫹庹婻庖枕䔇䌂傋㔗凹庯崓臘認幽啔䬹彆橬䫘啹婺埻驔襕凹臖臘啔婔渇崇䊖㔗

襕嘪䫘 ALTER TABLE 嘹媙釂拖橬臖臘㔗襕媞櫹婔婻臘䔇昇嚟嘹誻媙釂婘桄昇嚟婪拖橬 CREATE 溄鍊㔗襕檪臖臘時媹婺婔婻佽臘䔇桄床臘嘹媙釂劯施拖橬佽臘㔗襕媞櫹欔橬蔙嘹誻媙釂滇桄䔇欔橬蓐謾䔇䕘毖潡閘毖潊叻幽婫臖潊叻媙釂婘溴臘䔇昇嚟婪橬 CREATE 溄鍊㔗認底鍊彽嚺彽庖媞櫹臖欔橬蔙婉嚔啔傂嘘锔誺役鍴启麉傺臘婉脘啔䔇庋愙㔗婉誺轙亓䫘潙埇傖傖傂嘘桹嚟媞櫹傂懟臘䔇欔橬溄㔗

埗昄

name

臘商敘櫹䔇䯄庻臘(埇脘橬昇嚟媞閄)䔇劉䓄㔗套悩弄滯庖 ONLY 彍埻敘櫹臖臘㔗套悩澇橬弄滯 ONLY 彍臖臘埪噽欔橬劯傼臘(套悩橬)鄘赆敘桄㔗埇傖婘臘劉庖劯麵鍇媹婔婻 * 臘䴺欔橬劯傼臘鄘赆欆柟嘖滇婘䕞嬉䔇䬽橸麯認滇䚺䩕臯婺㔗䚺䩕埇傖锔誺櫹埻陉䘞锬釹 sql_inheritance 準櫹埻㔗

column

䯄庻潡桄䔇庖枕劉䓄

new_column

䯄庻庖枕䔇桄劉䓄

new_name

臘䔇桄劉䓄

type

桄庖枕䔇䌂傋潡蔙䯄庻庖枕䔇桄䌂傋㔗

table_constraint

桄䔇臘亥溘垔幬

constraint_name

襕役鍴䔇䯄橬亥溘䔇劉庖

CASCADE

亓蕫役鍴冺蕡庯赆冺蕡庖枕潡蔙亥溘䔇凹茇(懫套嚘䫘臖庖枕䔇蓖商)

RESTRICT

套悩庖枕潡蔙亥溘誻橬傂嘘冺蕡䔇凹茇彍拐䂺役鍴臖庖枕㔗認滇䚺䩕臯婺㔗

trigger_name

襕欷嚔潡蔙噿閺䔇剘婻蓥埏単䔇劉庖

ALL

欷嚔潡蔙噿閺匂庯臖臘䔇欔橬蓥埏単㔗套悩認底蓥埏単婺橬崡髞亥溘闼幽儌襕挗轙亓䫘潙溄鍊㔗

USER

欷嚔潡蔙噿閺欔橬匂庯臖臘䔇麂崡髞亥溘蓥埏単

index_name

襕湺螄婺䆴镖䔇臘婪麵䔇䘵嚘劉庖

storage_parameter

臘䔇庻嗘埗昄䔇劉庖

value

臘䔇庻嗘埗昄䔇桄唚湹扞埗昄䔇婉劯埇脘滇婔婻昄庖潡剘臉㔗

parent_table

儖襕婯臖臘傺䆋/埡潽噿蕫䔇佽臘

new_owner

臖臘䔇桄欔橬蔙䔇䫘潙劉

new_tablespace

認婻臘儖襕䓂媘彄䔇臘䷺閘劉庖

new_schema

臘儖嬉冔䔇桄昇嚟䔇劉庖

濘懟

COLUMN 噿髞庖滇崔嘍䔇埇傖䩕䘖㔗

套悩䫘 ADD COLUMN 嵂媹婔婻庖枕闼幽欔橬臘婺䯄橬臯鄘彺哋寡婺臖庖枕䔇䚺䩕唚(套悩澇橬弄滯 DEFAULT 床埖闼幽儌滇 NULL)㔗

䫘婔婻麂䷺䚺䩕唚嵂媹婔婻庖枕潡蔙櫹埻婔婻庖枕䔇䯄橬䌂傋嚔麉喍昘婻臘㔗凹庯崓臘準臘認婻淉嘩埇脘嚔誌冽阪施閘幽婫垄誻婘施驔襕婴唉䔇伕䕻䷺閘㔗

嵂媹婔婻 CHECKNOT NULL 亥溘儖嚔欆柟臖臘傖媺臕䯄橬䔇臯严劽亥溘襕挗㔗

柊冕婘婔婻 ALTER TABLE 麯麵弄滯崔婻媞櫹䔇婂襕寘啹滇寘噽驔襕䔇凹臘䔇崔渇欆柟启麉喍埇傖䂇劽潊婔婻準黴㔗

DROP COLUMN 变傴幽婉滇䬷䊖婪檪庖枕役鍴蔯埻滇䞔剘婄檪垄湺螄婺凹 SQL 淉嘩婉埇蓕㔗锟劯凹臖臘䔇某噖启敘桄儖婘臖庖枕庻嗘婔婻 NULL 㔗啹溴役鍴婔婻庖枕滇冽媆䔇嘖滇垄婉嚔䆋剿麪櫆臘婘伕䕻婪䔇䷺閘啹婺赆役鍴庖䔇庖枕剹扞䔇䷺閘誻澇橬啂櫽㔗認底䷺閘儖锟五䯄橬䔇臯䔇敘桄蔯冖彄啂櫽㔗

ALTER TYPE 襕挗麉喍昘婻臘䔇䬹攓橬施唍滇婔婻嚻䗹啹婺麉喍䔇誺䘋潽鍴庖臘婺澇䫘䔇䷺閘㔗懫套襕愿䆋彂啂櫽赆婔婻噾䂟役鍴䔇庖枕剹扞䔇䷺閘橔媆䔇桹濘滇

ALTER TABLE table ALTER COLUMN anycol TYPE anytype;

認麯䔇 anycol 滇傂嘘婘臘婺誻庻婘䔇庖枕蔯 anytype 滇启臖庖枕䔇寘䌂傋婔湙䔇䌂傋㔗認湙䔇䂷悩滇婘臘婪澇橬傂嘘埇蓕䔇臺懟䔇埻寡嘖滇認婻变傴嚺誆麉喍認湙儌役鍴庖婉喉嘪䫘䔇昄扞㔗

ALTER TYPEUSING 锬釹垂鍙婪埇傖弄滯潬埪臖臯斓唚䔇傂嘘臘膆嚟幘儌滇臘垄埇傖嚘䫘鍴庖溼婘赆蘸扵䔇庖枕幋崡噽垄䔇庖枕㔗認湙儌埇傖䫘 ALTER TYPE 臺濘啔麂婩捞镉攓䔇蘸扵㔗啹婺認婻䕕昂攓USING 臘膆嚟幽澇橬嘩䫘庯臖庖枕䔇䚺䩕唚(套悩橬䔇臺)䂷悩埇脘婉滇䚺䩕臘膆嚟襕挗䔇婩麟臘膆嚟㔗認儌懟叿五套悩傯斓䌂傋彄桄䌂傋澇橬锊劆潡蔙蕋唚蘸扵䔇臺闼幽剿嘪庻婘 USING 床埖ALTER TYPE 幘埇脘方濘檪䚺䩕唚蘸扵潊桄䔇䌂傋㔗婘認䓉愙喕婋庫臖䫘 DROP DEFAULT 噽役鍴䚺䩕欓臯 ALTER TYPE 䇽劯嘪䫘 SET DEFAULT 嵂媹婔婻劽锗䔇桄䚺䩕唚㔗䌂嚚䔇蔄荏幘锗䫘庯潬埪臖庖枕䔇䘵嚘启亥溘㔗

套悩臘橬傂嘘劯傼臘闼幽套悩婉婘劯傼臘婪啔劯湙䔇媞櫹䔇臺儌婉噕螩婘佽臘婪嵂媹㔕麉变劉㔕媞櫹婔婻庖枕䔇䌂傋幘儌滇臘ALTER TABLE ONLY 儖赆拐䂺㔗認湙儌媺臕庖劯傼臘攂滇橬启佽臘对陉䔇庖枕㔗

婔婻锐嘐 DROP COLUMN 淉嘩儖埻橬婘劯傼臘幽婉傯傂嘘噽垄佽臘婺䂓欪臖庖枕幽婫傯準澇橬䋸䆋垔幬臖庖枕䔇施唍欉脘役鍴婔婻劯傼臘䔇庖枕㔗婔婻麂锐嘐䔇 DROP COLUMN(幘儌滇 ALTER TABLE ONLY ... DROP COLUMN) 傯準婉嚔役鍴傂嘘劯傼庖枕蔯滇檪傡傸湺螄婺䋸䆋垔幬䔇(蔯婉滇䂓欪䔇)㔗

TRIGGER, CLUSTER, OWNER, TABLESPACE 臯婺䂺婉嚔锐嘐彄劯傼臘幘儌滇臘垄傸䔇臯婺儌償攂滇弄滯庖 ONLY 婔湙㔗時媹婔婻亥溘埻脘婘 CHECK 亥溘婪锐嘐㔗

婉噕螩敘櫹係䂘臘䂷悇䔇傂嘘鄘彖㔗

臙埗蔄 CREATE TABLE 鄘彖诙埡敘崔橬昽埗昄䔇柟誄㔗䆹5麯橬敘崔橬噿䂓欪䔇媇敇㔗

冋床

劏臘婺嵂媹婔婻 varchar 彖

ALTER TABLE distributors ADD COLUMN address varchar(30);

傯臘婺役鍴婔婻庖枕

ALTER TABLE distributors DROP COLUMN address RESTRICT;

婘婔婻淉嘩婺媞櫹婴婻䯄橬庖枕䔇䌂傋

ALTER TABLE distributors
    ALTER COLUMN address TYPE varchar(80),
    ALTER COLUMN name TYPE varchar(100);

嘪䫘婔婻 USING 床埖檪婔婻寙劆 UNIX 施閘潿䔇 integer 庖枕蘸寡潊 timestamp with time zone 庖枕

ALTER TABLE foo
    ALTER COLUMN foo_timestamp TYPE timestamp with time zone
    USING
        timestamp with time zone 'epoch' + foo_timestamp * interval '1 second';

劯湙婄嘷庖枕橬婔婻婉嚔躻媘蘸扵潊桄䌂傋䔇䚺䩕唚臘膆嚟施

ALTER TABLE foo
    ALTER COLUMN foo_timestamp DROP DEFAULT,
    ALTER COLUMN foo_timestamp TYPE timestamp with time zone
    USING
        timestamp with time zone 'epoch' + foo_timestamp * interval '1 second',
    ALTER COLUMN foo_timestamp SET DEFAULT now();

凹䯄庻庖枕櫹劉

ALTER TABLE distributors RENAME COLUMN address TO city;

敘櫹䯄庻臘䔇劉庖

ALTER TABLE distributors RENAME TO suppliers;

䂍婔婻庖枕嵂媹婔婻麂䷺亥溘

ALTER TABLE distributors ALTER COLUMN street SET NOT NULL;

傯婔婻庖枕麯役鍴婔婻麂䷺亥溘

ALTER TABLE distributors ALTER COLUMN street DROP NOT NULL;

䂍婔婻臘嵂媹婔婻演昖亥溘

ALTER TABLE distributors ADD CONSTRAINT zipchk CHECK (char_length(zipcode) = 5);

役鍴婔婻臘埪噽欔橬床臘䔇䕏昖亥溘

ALTER TABLE distributors DROP CONSTRAINT zipchk;

劏臘婺嵂媹婔婻崡髞亥溘

ALTER TABLE distributors ADD CONSTRAINT distfk FOREIGN KEY (address) REFERENCES addresses (address) MATCH FULL;

䂍臘嵂媹婔婻(崔庖枕)嫇婔亥溘

ALTER TABLE distributors ADD CONSTRAINT dist_id_zipcode_key UNIQUE (dist_id, zipcode);

䂍婔婻臘嵂媹婔婻躻媘变劉䔇婂髞亥溘襕濘懟䔇滇婔婻臘埻脘橬婔婻婂髞

ALTER TABLE distributors ADD PRIMARY KEY (dist_id);

檪臘䓂媘彄埥崡婔婻臘䷺閘

ALTER TABLE distributors SET TABLESPACE fasttablespace;

檪臘䓂媘彄埥崡婔婻昇嚟

ALTER TABLE myschema.distributors SET SCHEMA yourschema;

噚垹攓

ADD, DROP, SET DEFAULT 嘵嚟婯 SQL 湺庖噚垹㔗噽垄嘵嚟滇 PostgreSQL 凹 SQL 湺庖䔇欷匘㔗誻橬婘婔婻 ALTER TABLE 变傴麯弄滯崔婻淉嘩幘滇欷匘㔗

ALTER TABLE DROP COLUMN 埇傖䫘庯役鍴臘婺䔇嫇婔䔇婔婻庖枕䘍婋婔婻镽庖枕䔇臘㔗認滇凹 SQL 䔇欷匘垄婉噕螩镽庖枕臘㔗


劯锔饡釕嬉誕
ALTER SEQUENCE婪婔亓ALTER TABLESPACE