INFORMATICS

The Best

Przełącznik języka

Zaproś mnie na KAWE

Jeżeli podoba Ci się strona i chcesz wspomóc projekt!

Postaw mi kawę na buycoffee.to

This Site

Płatnik

CMS

Hardware

Uncategorised

Emulators

Powershell

Storage Array

DNS

Antivirus program

Licznik

2.png9.png1.png1.png2.png8.png9.png
Today21
Yesterday530
This week979
This month10262
Total2911289

Visitor Info

  • IP: 18.188.174.246
  • Browser: Unknown
  • Browser Version:
  • Operating System: Unknown

Who Is Online

9
Online

poniedziałek, 20 maj 2024 01:06

Using DROP DATABASE

Gwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywnaGwiazdka nieaktywna
 

Using DROP DATABASE

This command drops a database. It removes the catalog entries for the database and deletes the directory containing the data. It can only be executed by the database owner. This command cannot be executed while you or anyone else is connected to the target database (connect to postgres or any other database to issue this command).

Syntax

The syntax for DROP DATABASE is given below −

DROP DATABASE [ IF EXISTS ] name

Parameters

The table lists the parameters with their descriptions.

S. No.Parameter & Description
1

IF EXISTS

 

Do not throw an error if the database does not exist. A notice is issued in this case.

2

name

The name of the database to remove.

Example

The following is a simple example, which will delete testdb from your PostgreSQL schema −

postgres=# DROP DATABASE testdb;

 

Search