Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Allow number to start with ZERO when stored in mysql text field

 
Nidheesh Krishna
Ranch Hand
Posts: 52
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to store phone numbers starting with 0 but whenever i try to store this in MySql table the starting ZERO is removed because no number start with Zero actually
how i can solve this problem please do i need to change the field type from Integer to another type
 
khadar valli
Greenhorn
Posts: 22
Java MySQL Database Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Krishna,

Please modify the datatype of that column of phonenumber to varchar2 and insert the phone number in the string format. I hope this will work fine.

Regards,
Khadar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic