473,395 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

zerofill error

Hello
I'm trying to create a table as below
CREATE TABLE MyTable (ID FLOAT NOT NULL PRIMARY KEY ZEROFILL, Forename
VARCHAR(30),Surname VARCHAR(30));
If I remove ZEROFILL it works ok
But with ZEROFILL I get and error (1064)
I've tried ZEROFILL in different places and I'm stumped.
Please help
Best regards and thanks in advance

Mar 13 '06 #1
2 2377
NotVeryBright wrote:
Hello
I'm trying to create a table as below
CREATE TABLE MyTable (ID FLOAT NOT NULL PRIMARY KEY ZEROFILL, Forename
VARCHAR(30),Surname VARCHAR(30));
If I remove ZEROFILL it works ok
But with ZEROFILL I get and error (1064)
I've tried ZEROFILL in different places and I'm stumped.
Please help
Best regards and thanks in advance

Try:
CREATE TABLE MyTable (ID FLOAT ZEROFILL NOT NULL PRIMARY KEY, Forename
VARCHAR(30),Surname VARCHAR(30));

From the DOCS:http://dev.mysql.com/doc/refman/5.0/...-overview.html


FLOAT[(M,D)] [UNSIGNED] [ZEROFILL]

A small (single-precision) floating-point number. Allowable values are
-3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to
3.402823466E+38. These are the theoretical limits, based on the IEEE
standard. The actual range might be slightly smaller depending on your
hardware or operating system.

M is the total number of decimal digits and D is the number of digits
following the decimal point. If M and D are omitted, values are stored to
the limits allowed by the hardware. A single-precision floating-point
number is accurate to approximately 7 decimal places.

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

UNSIGNED, if specified, disallows negative values.


Mar 13 '06 #2
Thanks Noone,
Tried it out works fine
Thanks very much
and Best regards


Mar 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
5
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
3
by: Khazret Sapenov | last post by:
Hi, What is the practical use of ZEROFILL in your case? regards, Khaz
13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
2
by: WebSnozz | last post by:
I am losing the leading zeros when I get autoincrement IDs from a column with ZEROFILL enabled. I would like to have the leading zeros. I have tried both the php function last_insert_id as well...
1
by: sonia.sardana | last post by:
Hi frnds, I want to know that zerofill is a valid function in SQL or not....
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.