Skip to content

Coder Tutorial

Menu
  • Home
  • HTML
  • CSS
  • PHP
  • SQL
  • MySQL
  • JS
  • PL/SQL
  • Python
  • Java
  • Oracle
Home
PostgreSQL
PostgreSQL Constraint of relation does not exist

PostgreSQL Constraint of relation does not exist

Constraint of relation does not exist

The cause of error: There is no constraint created with the specified name.
Check the constraint name.

Wrong drop

ALTER TABLE test.customers 
DROP CONSTRAINT fk_address_test;

Messages

ERROR: constraint “fk_address_test” of relation “customers” does not exist

Correct drop

ALTER TABLE test.customers 
DROP CONSTRAINT fk_address2;

Messages

ALTER TABLE

Tutorials

  • PostgreSQL Tutorial
  • PostgreSQL Create Table
  • PostgreSQL Drop Table
  • PostgreSQL Select
  • PostgreSQL Insert
  • PostgreSQL Update
  • PostgreSQL Delete
  • PostgreSQL Distinct
  • PostgreSQL Where
  • PostgreSQL And – Or
  • PostgreSQL Between
  • PostgreSQL Like
  • PostgreSQL Order By
  • PostgreSQL Group By
  • PostgreSQL Having
  • PostgreSQL Count
  • PostgreSQL AVG
  • PostgreSQL MAX
  • PostgreSQL MIN
  • PostgreSQL SUM
  • PostgreSQL View
  • PostgreSQL Create Function
  • PostgreSQL Create Trigger

Recent Posts

  • Java Polymorphism
  • Java Encapsulation
  • Java Abstraction
  • PostgreSQL ERROR: cannot begin/end transactions in PL/pgSQL
  • PostgreSQL Column must appear in the GROUP BY clause
  • PostgreSQL Column specified more than once
  • PostgreSQL Create database, Alter database examples
  • PostgreSQL Create schema syntax, Alter schema
  • PostgreSQL Create database user, alter and drop username
  • PostgreSQL Alter table name. Modify column name
Coder Tutorial Copyright © 2025. | Privacy Policy
Back to Top ↑
x