In Oracle, you can use "drop sequence sequence name" to delete sequence; sequence means automatically increasing the sequence of numbers, that is, the sequence number. The sequence number automatically increases and cannot be reset, so you need to use the drop sequence statement. to delete the sequence.
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
In Oracle, sequence is the so-called serial number. It will automatically increase every time it is taken. It is generally used in places that need to be sorted by serial number. The advantage is that it is accurate and efficient, but the disadvantage is that it cannot be reset and will continue to increase unless it is deleted and re-created;
Delete Sequence
Execute the following statement to achieve deletion
Oracle delete sequence: drop sequence xxxx
DROP SEQUENCE sequence_test; drop sequence student_id;
Extended knowledge:
Create Sequence
You must first have CREATE SEQUENCE Or CREATE ANY SEQUENCE permission, (usually all have this permission)
CREATE SEQUENCE sequence_test
INCREMENT BY 1 -- Add a few at a time
START WITH 1 -- Start counting from 1
2. Use Sequence (CURRVAL, NEXTVAL)
CURRVAL = Return the current value of sequence NEXTVAL = Increase the value of sequence, and then return the sequence value SELECT sequence_test.NEXTVAL FROM DUAL;Achieve self-increment effect SELECT sequence_test.CURRVAL FROM DUAL;View the current sequence valueNote: Where sequence can be used:ALTER sequence_test MAXVALUE 10000 MINVALUE -300Recommended tutorial: "
Oracle Video Tutorial"
The above is the detailed content of How to delete sequence in oracle. For more information, please follow other related articles on the PHP Chinese website!