Possible Duplicate:
How do I reset a sequence in Oracle?
I have a table in oracle db. The table contains huge number of rows always, say a few hundred thousands. I have set a id in that table and used a sequence and a trigger such that every time a record is inserted id is automatically generated and inserted. Now while traversing the existing rows through java code, sometimes the data in that table can be truncated and new rows can be inserted. In that case, I want the sequence to start again from 1 when the table is empty.
The sequence looks like
CREATE SEQUENCE DUMMY_DETAILS_SEQ
START WITH 356005
MAXVALUE 999999999999999999999999999
MINVALUE 1
NOCYCLE
CACHE 20
NOORDER;