• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can we store the values in the DB

 
Mastan Rao
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Numbers don't have leading zeros, so the only option would be to store them as datatype varchar.
 
S J Martin
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or, ...
Store them as the value that they are and worry about rendering where it matters. ;-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic