2021
01-08
01-08
postgresql删除主键的操作
ALTERTABLEtablenameDROPCONSTRAINTprimaryname。talbename:表示表名primaryname:表示主键名例子:postgres=#\dc_tab;Table"public.c_tab"Column|Type|Modifiers---------------+-----------------------------+-----------uptime|timestampwithouttimezone|notnulltemp|integer|Indexes:"c_tab_pkey"PRIMARYKEY,btree(uptime)上面的c_tab_pkey就是主键名。postgres=#alte...
继续阅读 >