Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

how do I fortmat integer number ?

Posted on 2009-04-08
2
1,033 Views
Last Modified: 2012-05-07
I have a mysql table data type integer field. the value is stored as 1, 2, 3 .., 10000.

I want to format it with starting from 00001, 00002, 0003 etc., (the whole number to be 5 digit).

Is there any function to do?
0
Comment
Question by:Loganathan Natarajan
  • 2
2 Comments
 
LVL 21

Expert Comment

by:theGhost_k8
ID: 24097823
0
 
LVL 21

Accepted Solution

by:
theGhost_k8 earned 125 total points
ID: 24097868
Using Query:
SELECT LPAD(YourFieldName,5,'0') FROM TableName;
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MySQL Init Waits 25 118
How to loop bootstrap columns which contain database records 9 56
running code or pseudo code of table structure 5 30
MySql Recovery 2 27
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question