This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 41124
    
  45
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
 
Similar Threads
Verifying the db file
remove null
why we can't avoid hash collision in practice ?
Arraylist Size
(How do i do paging in JSP ????? HELP ME >URGENT