1DROP SEQUENCE() SQL Commands DROP SEQUENCE()
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.
15
17 IF EXISTS
18 Do not throw an error if the sequence does not exist. A notice
19 is issued in this case.
20
21 name 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
31 To remove the sequence serial:
32
33 DROP SEQUENCE serial;
34
35
37 DROP SEQUENCE conforms to the SQL standard, except that the standard
38 only allows one sequence to be dropped per command, and apart from the
39 IF EXISTS option, which is a PostgreSQL extension.
40
42 CREATE SEQUENCE [create_sequence(7)], ALTER SEQUENCE
43 [alter_sequence(l)]
44
45
46
47SQL - Language Statements 2008-06-08 DROP SEQUENCE()