<< previous page   --   table of contents   --   next page >>
| | | | | | | |
  • Return to Table of Contents
  • Table of Contents

    1. General Information
    2. MySQL Installation
    3. Tutorial Introduction
    4. Database Administration
    5. MySQL Optimisation
    6. MySQL Language Reference
    7. MySQL Table Types
    8. MySQL APIs
    9. Extending MySQL

    392 MySQL Technical Reference for Version 4.0.3 ENUM('value1','value2',...) An enumeration.   A string object that can have only one value,  chosen from the list of values 'value1', 'value2', ..., NULL or the special "" error value. An  ENUM  can  have  a  maximum  of  65535  distinct  values.   See  Section  6.2.3.3 [ENUM], page 402. SET('value1','value2',...) A set.  A string object that can have zero or more values, each of which must be chosen from the list of values  'value1',  'value2',  ...  A  SET  can have a maximum of 64 members.  See Section 6.2.3.4 [SET], page 403. 6.2.1  Numeric Types MySQL supports all of the ANSI/ISO SQL92 numeric types.  These types include the exact numeric data types (NUMERICDECIMALINTEGER, and SMALLINT), as well as the approximate numeric data types (FLOATREAL, and DOUBLE PRECISION).  The keyword INT is a synonym for INTEGER, and the keyword DEC is a synonym for DECIMAL. The NUMERIC and DECIMAL types are implemented as the same type by MySQL, as permitted by the SQL92 standard.  They are used for values for which it is important to preserve exact precision, for example with monetary data.  When declaring a column of one of these types the precision and scale can be (and usually is) speci ed; for example: salary DECIMAL(5,2) In  this  example,  5  (precision)  represents  the  number  of  signi cant  decimal  digits  that will be stored for values, and 2 (scale) represents the number of digits that will be stored following the decimal point.  In this case, therefore, the range of values that can be stored in the salary column is from -99.99 to 99.99.  (MySQL can actually store numbers up to 999.99 in this column because it doesn't have to store the sign for positive numbers) In  ANSI/ISO  SQL92,  the  syntax  DECIMAL(p)  is  equivalent  to  DECIMAL(p,0).   Similarly, the syntax DECIMAL is equivalent to DECIMAL(p,0), where the implementation is allowed to decide the value of p.  MySQL does not currently support either of these variant forms of the DECIMAL/NUMERIC data types.  This is not generally a serious problem, as the principal bene ts of these types derive from the ability to control both precision and scale explicitly. DECIMAL  and  NUMERIC  values  are  stored  as  strings,  rather  than  as  binary   oating-point numbers, in order to preserve the decimal precision of those values.  One character is used for each digit of the value, the decimal point (if scale > 0), and the `-' sign (for negative numbers).  If scale is 0, DECIMAL and NUMERIC values contain no decimal point or fractional part. The maximum range of  DECIMAL  and  NUMERIC  values is the same as for  DOUBLE,  but the actual range for a given DECIMAL or NUMERIC column can be constrained by the precision or  scale  for a given column.   When such a column is assigned a value with more digits following the decimal point than are allowed by the speci ed scale, the value is rounded to that scale.  When a DECIMAL or NUMERIC column is assigned a value whose magnitude exceeds the range implied by the speci ed (or defaulted)  precision  and  scale, MySQL stores the value representing the corresponding end point of that range.
     

    Customer Support CentreMySQL Reference Manual

    Web Hosting Services
    UNIX WEB HOSTING
    SUPPORT & FAQ's
    TERMS OF USE
    Domain Services
    DOMAIN REGISTRATION
    MANAGE YOUR ACCOUNT
    SUPPORT & FAQ's
    TERMS OF USE
    SITE MAP
    Home
    Hosting Plans | Domain Registration | About Us | Contact Us | Site Map
    Terms of Use | Privacy Policy | Guarantees
    Merchant Accounts

    SpiritHost - web hosting for spiritual and education sites
    SpiritHit.com - Religious and Spiritual Portal
  • Return to Table of Contents
  • Back to top

  • Web Hosting: Manuals & FAQ's

    1. Unix-Based Web Hosting
    2. Unix Dedicated Servers
    3. Windows Dedicated Servers
    4. CuteFTP User’s Guide
    5. CuteHTML User’s Guide
    6. WS_FTP Pro User's Guide
    7. Miva Order User's Guide
    8. Miva Merchant User's Guide