---
title: Database management using InfluxQL
menu:
influxdb_1_5:
name: Data management
weight: 40
parent: InfluxQL
---
InfluxQL offers a full suite of administrative commands.
If you're looking for `SHOW` queries (for example, `SHOW DATABASES` or `SHOW RETENTION POLICIES`), see [Schema Exploration](/influxdb/v1.5/query_language/schema_exploration).
The examples in the sections below use InfluxDB's [Command Line Interface (CLI)](/influxdb/v1.5/introduction/getting-started/).
You can also execute the commands using the HTTP API; simply send a `GET` request to the `/query` endpoint and include the command in the URL parameter `q`.
See the [Querying Data](/influxdb/v1.5/guides/querying_data/) guide for more on using the HTTP API.
> **Note:** When authentication is enabled, only admin users can execute most of the commands listed on this page.
See the documentation on [authentication and authorization](/influxdb/v1.5/query_language/authentication_and_authorization/) for more information.
## Data Management
### CREATE DATABASE
Creates a new database.
#### Syntax
```sql
CREATE DATABASE [WITH [DURATION ] [REPLICATION ] [SHARD DURATION ] [NAME ]]
```
#### Description of Syntax
`CREATE DATABASE` requires a database [name](/influxdb/v1.5/troubleshooting/frequently-asked-questions/#what-words-and-characters-should-i-avoid-when-writing-data-to-influxdb).
The `WITH`, `DURATION`, `REPLICATION`, `SHARD DURATION`, and `NAME` clauses are optional and create a single [retention policy](/influxdb/v1.5/concepts/glossary/#retention-policy-rp) associated with the created database.
If you do not specify one of the clauses after `WITH`, the relevant behavior defaults to the `autogen` retention policy settings.
The created retention policy automatically serves as the database's default retention policy.
For more information about those clauses, see [Retention Policy Management](/influxdb/v1.5/query_language/database_management/#retention-policy-management).
A successful `CREATE DATABASE` query returns an empty result.
If you attempt to create a database that already exists, InfluxDB does nothing and does not return an error.
#### Examples
##### Example 1: Create a database
```
> CREATE DATABASE "NOAA_water_database"
>
```
The query creates a database called `NOAA_water_database`.
[By default](/influxdb/v1.5/administration/config/#retention-autocreate-true), InfluxDB also creates the `autogen` retention policy and associates it with the `NOAA_water_database`.
##### Example 2: Create a database with a specific retention policy
```
> CREATE DATABASE "NOAA_water_database" WITH DURATION 3d REPLICATION 1 SHARD DURATION 1h NAME "liquid"
>
```
The query creates a database called `NOAA_water_database`.
It also creates a default retention policy for `NOAA_water_database` with a `DURATION` of three days, a [replication factor](/influxdb/v1.5/concepts/glossary/#replication-factor) of one, a [shard group](/influxdb/v1.5/concepts/glossary/#shard-group) duration of one hour, and with the name `liquid`.
### Delete a database with DROP DATABASE
The `DROP DATABASE` query deletes all of the data, measurements, series, continuous queries, and retention policies from the specified database.
The query takes the following form:
```sql
DROP DATABASE
```
Drop the database NOAA_water_database:
```bash
> DROP DATABASE "NOAA_water_database"
>
```
A successful `DROP DATABASE` query returns an empty result.
If you attempt to drop a database that does not exist, InfluxDB does not return an error.
### Drop series from the index with DROP SERIES
The `DROP SERIES` query deletes all points from a [series](/influxdb/v1.5/concepts/glossary/#series) in a database,
and it drops the series from the index.
> **Note:** `DROP SERIES` does not support time intervals in the `WHERE` clause.
See
[`DELETE`](/influxdb/v1.5/query_language/database_management/#delete-series-with-delete)
for that functionality.
The query takes the following form, where you must specify either the `FROM` clause or the `WHERE` clause:
```sql
DROP SERIES FROM WHERE =''
```
Drop all series from a single measurement:
```sql
> DROP SERIES FROM "h2o_feet"
```
Drop series with a specific tag pair from a single measurement:
```sql
> DROP SERIES FROM "h2o_feet" WHERE "location" = 'santa_monica'
```
Drop all points in the series that have a specific tag pair from all measurements in the database:
```sql
> DROP SERIES WHERE "location" = 'santa_monica'
```
A successful `DROP SERIES` query returns an empty result.
### Delete series with DELETE
The `DELETE` query deletes all points from a
[series](/influxdb/v1.5/concepts/glossary/#series) in a database.
Unlike
[`DROP SERIES`](/influxdb/v1.5/query_language/database_management/#drop-series-from-the-index-with-drop-series), it does not drop the series from the index and it supports time intervals
in the `WHERE` clause.
The query takes the following form where you must include either the `FROM`
clause or the `WHERE` clause, or both:
```
DELETE FROM WHERE [=''] | [