Android
Android

Reputation: 9023

Oracle Sequence increment by 0.5

i am new to oracle but i want the sequence that increment by 0.5 how it possible?

enter image description here

kindly help me to solve this problem

Upvotes: 0

Views: 286

Answers (1)

haki
haki

Reputation: 9759

Will , You can't create a sequeance that will increment by 0.5 but you can use a trick

create sequence sq start with 1 increment by 1;

select 0.5 * sq.nextval from dual connect by level < 11

| 0.5*SQ.NEXTVAL |
------------------
|            0.5 |
|              1 |
|            1.5 |
|              2 |
|            2.5 |
|              3 |
|            3.5 |
|              4 |
|            4.5 |
|              5 |

Upvotes: 3

Related Questions