
November 21st, 2003, 08:01 AM
|
|
Senior Member
|
|
Join Date: Sep 2003
Location: Canada
Posts: 305
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 10
|
|
|
You can use the oracle CRAETE SEQUENCE command to generate the sequencies no matter in Ascending or Descending order the complete command as follows:
SQL>CREATE sequence EMP_SEQ
START WITH 1
MINVALUE 1
MAXVALUE 10000
INCREMENT BY 1
NOCYCLE
NOCHACHE
/
The above example will generate a sequence with name EMP_SEQ and the first number of this sequnce will be start with 1 and its minimum values is 1, this sequence will stop generating sequence whenever it reaches the maxvalue i,e 10000, interval between two numbers of the sequnce is 1. this sequence generate the numbers like that:
1 2 3 4 5 6 7 .......................................10000
Regards,
|