1DROP SEQUENCE(7) SQL Commands DROP SEQUENCE(7)
2
3
4
6 DROP SEQUENCE - remove a sequence
7
8
10 DROP SEQUENCE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
11
12
14 DROP SEQUENCE removes sequence number generators. A sequence can only
15 be dropped by its owner or a superuser.
16
18 IF EXISTS
19 Do not throw an error if the sequence does not exist. A notice
20 is issued in this case.
21
22 name The name (optionally schema-qualified) of a sequence.
23
24 CASCADE
25 Automatically drop objects that depend on the sequence.
26
27 RESTRICT
28 Refuse to drop the sequence if any objects depend on it. This is
29 the default.
30
32 To remove the sequence serial:
33
34 DROP SEQUENCE serial;
35
36
38 DROP SEQUENCE conforms to the SQL standard, except that the standard
39 only allows one sequence to be dropped per command, and apart from the
40 IF EXISTS option, which is a PostgreSQL extension.
41
43 CREATE SEQUENCE [create_sequence(7)], ALTER SEQUENCE
44 [alter_sequence(7)]
45
46
47
48SQL - Language Statements 2011-09-22 DROP SEQUENCE(7)