• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

problem with sequence sql  RSS feed

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to Create a Sequence sql started with  000 and Increment by 1 i work with oracle 11g why i can't use IDENTITY column but when i use  a sequence as the following

it generate a result like

2
3
.
.
.
it trucate the  left 0
i don't now how to solve this problem
 
Sheriff
Posts: 21649
101
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sequences generate numbers. Numbers don't have leading zeroes, that is just a way of rendering them. Numerically speaking, 1 is the same as 001 is the same as 00000001.
(In Java, a leading 0 means the number is an octal literal, so it does have some meaning there.)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!