Sequence number generator in oracle
Using Oracle's sub query factory clause: WITH , you can select numbers from 1 to 100: WITH t(n) AS ( SELECT 1 from dual UNION ALL SELECT n1 FROM t WHERE n 100 ) SELECT FROM t; share improve this answerIn Oracle, you can create an autonumber field by using sequences. A sequence is an object in Oracle that is used to generate a number sequence. This can be useful when you need to create a unique number to act as a primary key. sequence number generator in oracle
Where does a requirement like this come from? I want to generate a number, but not use a sequence and never use anything that is divisible by 5. Why not use a sequence? What possible reason could there be? Next, you will want to store data, but not use a table.