aspose file tools*
The moose likes JDBC and the fly likes How can we store the values in the DB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How can we store the values in the DB" Watch "How can we store the values in the DB" New topic
Author

How can we store the values in the DB

Mastan Rao
Greenhorn

Joined: Nov 26, 2007
Posts: 10
Hi All,

How can we store the value in the Data Base with the 0's in the before the number.

Ex:I have a number in the Db with value 36 , I want that value to be stored as 00036 in the DB.Can any one help me to do that.

Thanks in Advance,

Mastan.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42632
    
  65
Numbers don't have leading zeros, so the only option would be to store them as datatype varchar.


Ping & DNS - my free Android networking tools app
S J Martin
Greenhorn

Joined: Jul 31, 2007
Posts: 23
Or, ...
Store them as the value that they are and worry about rendering where it matters. ;-)


Never attribute to malice that which is easily explained by incompetence.<br />SCJP (1.5)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can we store the values in the DB