Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

drop table sales; ERROR: cannot drop table sales because other objects depend on it DETAIL: constraint car_sales_id_fkey on table car depends on table sales HINT: Use DROP ... CASCADE to drop the dependent objects too.

Solution :
Becouse foreign key is there in sales table so if you want to delete that table you need to specify Cascade option

postgres=# drop table sales;
ERROR:  cannot drop table sales because other objects depend on it
DETAIL:  constraint car_sales_id_fkey on table car depends on table sales
HINT:  Use DROP ... CASCADE to drop the dependent objects too.
postgres=# drop table sales cascade;
NOTICE:  drop cascades to constraint car_sales_id_fkey on table car
DROP TABLE
Do you want to learn  More About foreign Key  Click The Below Link

Comments

Popular posts from this blog

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated ORA-01262: Stat failed on a file destination directory Linux-x86_64 Error: 2: No such file or directory

PostgreSQL Database startup / shutdown /restart

PostgreSQL pgBadger

How to configure Replication Manager (repmgr) ?