![]() |
![]() |
Free Books / Computers / Practical PostgreSQL / | ![]() |
|
![]() |
||||
![]() |
![]() |
|||
![]() |
![]() |
|||
![]() |
||||
|
|
||||
![]() |
![]() |
|||
![]() |
Destroying a Sequence |
![]() |
||
![]() |
||||
![]() |
![]() |
![]() |
||
![]() |
||||
This section is from the "Practical PostgreSQL" book, by John Worsley and Joshua Drake. Also available from Amazon: Practical PostgreSQL.
To destroy a sequence generator, use the drop sequence command. You can list several sequences to be dropped at a time. The syntax for drop sequence is:
DROP SEQUENCE seq_name1, seq_name2, ...;
This removes the invoice sequence from the database:
Example 5-35. Removing a Sequence
DROP SEQUENCE seq_invoice;
|
Caution |
|---|---|
|
Before destroying a sequence, make sure that the sequence is not used by another table, function, or any other object in the database. If this check is not performed, then other operations that use the sequence will fail. |
 
Continue to:
postgresql, psql, relational database, sql, standard, query, programming, administration
![]() |
|
|