Force Drop Database PostgreSQL

Table of Contents

Force Drop Database PostgreSQL

-- Check current activity sessions
SELECT pg_terminate_backend(pid)
 FROM pg_stat_activity
 WHERE datname = 'nongnghiepdongnai';

-- Drop DB
DROP DATABASE nongnghiepdongnai;

Leave a Reply

Your email address will not be published. Required fields are marked *