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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 39575
    
  27
Numbers don't have leading zeros, so the only option would be to store them as datatype varchar.


Ping & DNS - updated with new look and Ping home screen widget
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
 
Similar Threads
Verifying the db file
Arraylist Size
remove null
(How do i do paging in JSP ????? HELP ME >URGENT
why we can't avoid hash collision in practice ?