473,657 Members | 2,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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),Sur name 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 2395
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),Sur name 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),Sur name 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
4369
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 files containing some templates: adjacency_list.hpp and mem_fn.hpp can not compile. Does anyone have any solutions?
5
16244
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 Server might not be running or the path exists and is redirected to another machine. Please check the status of this virtual directory in the Internet Services Manager."
3
19207
by: Khazret Sapenov | last post by:
Hi, What is the practical use of ZEROFILL in your case? regards, Khaz
13
6593
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
5002
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. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version, which I did, then reran WebSetup.msi and keeps giving me this error. "The installer was interrupted...
2
2962
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 as running a SELECT query and using the result. I am getting the correct id, it is just losing the leading zeros. I have doulbe checked the table in the database, and it does have the leading zeros. Thanks for any help. $result =...
1
3009
by: sonia.sardana | last post by:
Hi frnds, I want to know that zerofill is a valid function in SQL or not....
2
19457
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 will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
0
2897
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 will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1611
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.