1DROP SEQUENCE(7)        PostgreSQL 9.2.24 Documentation       DROP SEQUENCE(7)
2
3
4

NAME

6       DROP_SEQUENCE - remove a sequence
7

SYNOPSIS

9       DROP SEQUENCE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
10

DESCRIPTION

12       DROP SEQUENCE removes sequence number generators. A sequence can only
13       be dropped by its owner or a superuser.
14

PARAMETERS

16       IF EXISTS
17           Do not throw an error if the sequence does not exist. A notice is
18           issued in this case.
19
20       name
21           The name (optionally schema-qualified) of a sequence.
22
23       CASCADE
24           Automatically drop objects that depend on the sequence.
25
26       RESTRICT
27           Refuse to drop the sequence if any objects depend on it. This is
28           the default.
29

EXAMPLES

31       To remove the sequence serial:
32
33           DROP SEQUENCE serial;
34

COMPATIBILITY

36       DROP SEQUENCE conforms to the SQL standard, except that the standard
37       only allows one sequence to be dropped per command, and apart from the
38       IF EXISTS option, which is a PostgreSQL extension.
39

SEE ALSO

41       CREATE SEQUENCE (CREATE_SEQUENCE(7)), ALTER SEQUENCE
42       (ALTER_SEQUENCE(7))
43
44
45
46PostgreSQL 9.2.24                 2017-11-06                  DROP SEQUENCE(7)
Impressum