DROP TABLE
臺濘
DROP TABLE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
柟誄
DROP TABLE 傯昄扞康婺役鍴臘潡蓖商㔗埻橬噽欔橬蔙欉脘役鍴婔婻臘潡蓖商㔗襕橙䷺蔯婉滇役鍴臘臙嘪䫘 DELETE 潡 TRUNCATE 㔗
DROP TABLE 攂滇役鍴䕞湺臘婪䯄橬䔇傂嘘䘵嚘㔕蓇彍㔕蓥埏単㔕亥溘㔗嘖滇襕役鍴婔婻橬蓖商潡蔙噽垄臘䫘崡髞亥溘嚘䫘䔇臘媙釂弄滯 CASCADE 㔗CASCADE 儖役鍴嚘䫘䔇蓖商嘖滇套悩滇崡髞亥溘闼幽儌埻役鍴崡髞亥溘蔯婉滇埥崡婔婻臘㔗
埗昄
- IF EXISTS
套悩毺垔䔇臘婉庻婘闼幽埏庺婔婻 notice 蔯婉滇檕庺婔婻髍臇㔗
- name
襕役鍴䔇䯄庻臘䔇劉庖(埇傖橬昇嚟媞閄)
- CASCADE
亓蕫役鍴冺蕡庯臘䔇凹茇(懫套蓖商)
- RESTRICT
套悩庻婘冺蕡凹茇彍拐䂺役鍴臖臘㔗認婻滇䚺䩕㔗
冋床
役鍴 films 启 distributors 臘
DROP TABLE films, distributors;
噚垹攓
溴变傴噚垹 SQL 湺庖㔗埻婉誺湺庖埻噕螩婔溇变傴役鍴婔婻臘㔗溴崡IF EXISTS 锬釹滇 PostgreSQL 䔇欷匘㔗