错误en canceacion de llave foranea - 丢弃外键postgresql错误

时间:2017-02-22 03:50:57

标签: postgresql

我使用以下查询:

alter table hlt_citas drop constraint Ref_hlt_citas_to_hlt_atencion;

当我查询表的结构时,外键的部分如下:

"Ref_hlt_citas_to_hlt_atencion" FOREIGN KEY (cod_atencion)
REFERENCES hlt_atencion(cod_atencion) ON UPDATE CASCADE ON DELETE RESTRICT

但是当我运行查询时,它告诉我它不存在。

1 个答案:

答案 0 :(得分:0)

当列号或约束名称等标识符以双引号给出时,标识符将区分大小写。然后,您还应该在查询中使用双引号来保持区分大小写:

alter table hlt_citas drop constraint "Ref_hlt_citas_to_hlt_atencion";
相关问题