Database Forum
Web Database Register Members List Calendar FAQ

 
Go Back   Database Forum > Database Management > PHP & MySQL
User Name
Password

Reply
 
Thread Tools Search this Thread Display Modes
Default MySQL field attributes
09-07-2010, 05:00 PM #1  

Niko
Member

 
Status: Offline
Posts: 34
Join Date: Mar 2005
Location: Canada

I noticed if you specify ZEROFILL for a numeric column, MySQL automatically adds the UNSIGNED attribute to the column.

Just curiuos about the zero fill. When would you really want to use it?
Reply With Quote

Default
09-07-2010, 05:18 PM #2  

xacto
Senior Member

 
Status: Offline
Posts: 159
Join Date: Mar 2005
Location: Miami, Florida

Maybe the user has an integer field that must have uniform length, so they may prefer to have the leading portion fill with zeroes.
One common usage for this is creating invoice ids. (eg) All order numbers on the INT field have the same length ‘000090.
It really depends on how the sql query needs to be performed in a sql query or script.
Reply With Quote

Default
03-18-2011, 06:26 AM #3  

Ramgoti009
Junior Member

 
Status: Offline
Posts: 3
Join Date: Dec 2010
Location: Bangladesh

Send a message via Yahoo to Ramgoti009
You will need to query the information_schema in the table columns were you will give as parameter the db name and table name.then you will be able to read only the column name for that matter. You must have access to the information schema to grab this information. Good luck.

Last edited by Jenn; 05-25-2011 at 06:53 PM..
Reply With Quote

Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -5. The time now is 01:03 AM.

Powered by: vBulletin Version 3.7.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Database Forums

Help support our forum assistants and product development ->

go to top go to top