Skip to content

Commit 965035a

Browse files
devanbenzjstirnaman
authored andcommitted
feat(docs): Update manage-database.md (#5603)
Part three of deletion outside of default retention policy feature request work. This updates the InfluxQL documentation to reflect that a retention policy can now be specified in the `FROM` clause for `DELETE`. closes influxdata/feature-requests#175
1 parent d861ef4 commit 965035a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

content/influxdb/v1/query_language/manage-database.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,20 @@ Delete all data in the database that occur before January 01, 2020:
171171
> DELETE WHERE time < '2020-01-01'
172172
```
173173

174+
Delete all data associated with the measurement `h2o_feet` in retention policy `one_day`:
175+
```
176+
> DELETE FROM "one_day"."h2o_feet"
177+
```
178+
174179
A successful `DELETE` query returns an empty result.
175180

176181
Things to note about `DELETE`:
177182

178183
* `DELETE` supports
179184
[regular expressions](/influxdb/v1/query_language/explore-data/#regular-expressions)
180185
in the `FROM` clause when specifying measurement names and in the `WHERE` clause
181-
when specifying tag values.
186+
when specifying tag values. It *does not* support regular expressions for the retention policy in the `FROM` clause.
187+
`DELETE` requires that you define *one* retention policy in the `FROM` clause.
182188
* `DELETE` does not support [fields](/influxdb/v1/concepts/glossary/#field) in the `WHERE` clause.
183189
* If you need to delete points in the future, you must specify that time period as `DELETE SERIES` runs for `time < now()` by default. [Syntax](https://github.com/influxdata/influxdb/issues/8007)
184190

0 commit comments

Comments
 (0)