N+1 LPAD(TO_CHAR(N+1),8,'0')
2 00000002
11 00000011
101 00000101
1001 00001001
10001 00010001
100001 00100001
1000001 01000001
with CTE as (
select 1 as n from dual union all
select 10 as n from dual union all
select 100 as n from dual union all
select 1000 as n from dual union all
select 10000 as n from dual union all
select 100000 as n from dual union all
select 1000000 as n from dual
)
select
to_char(n+1)
, lpad(to_char(n+1), 8,'0')
from cte
Just adjust for the wanted width (2nd parameter)
Title | # Comments | Views | Activity |
---|---|---|---|
Solar Winds Database performance Analyzer | 2 | 74 | |
percentage remaining | 6 | 40 | |
Pfile and SPfile - Oracle | 2 | 35 | |
Oracle Next Available Number | 2 | 12 |
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
12 Experts available now in Live!