Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1039
  • Last Modified:

how do I fortmat integer number ?

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
Loganathan Natarajan
Asked:
Loganathan Natarajan
  • 2
1 Solution
 
K VDatabase ConsultantCommented:
0
 
K VDatabase ConsultantCommented:
Using Query:
SELECT LPAD(YourFieldName,5,'0') FROM TableName;
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now