Mark
Mark

Reputation: 169

How to delete old database

I'm using the PostgreSQL app and I want to delete my old database for my old project. How do I do that? I've tried drop database portfoliodb but it's still there and I don't receive any feedback.

enter image description here

Upvotes: 0

Views: 1137

Answers (2)

James Douglas
James Douglas

Reputation: 3446

You probably forgot to add a semicolon on the end of your command.

You ran: drop database portfoliodb

But you should have run: drop database portfoliodb;

Upvotes: 0

Laurenz Albe
Laurenz Albe

Reputation: 246473

  • First, connect to postgres not to portfoliodb. You cannot drop the database that you (or anybody else) is connected to.

  • Then, don't forget the semicolon after the SQL statement to complete it:

    DROP DATABASE portfoliodb;
    

Upvotes: 1

Related Questions