<< 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

    406 MySQL Technical Reference for Version 4.0.3 Storage requirements for string types Column type Storage required CHAR(M) M  bytes,  1 <= M <= 255 VARCHAR(M) L+1 bytes, where L <= M and 1 <= M <= 255 TINYBLOBTINYTEXT L+1 bytes, where L < 2^8 BLOB,  TEXT L+2 bytes, where L < 2^16 MEDIUMBLOB,  MEDIUMTEXT L+3 bytes, where L < 2^24 LONGBLOB,  LONGTEXT L+4 bytes, where L < 2^32 ENUM('value1','value2',...)   1 or 2 bytes,  depending on the number of enumeration values (65535 values maximum) SET('value1','value2',...) 1,  2,  3,  4  or  8  bytes,  depending  on  the  number  of  set members (64 members maximum) VARCHAR  and the  BLOB  and  TEXT  types are variable-length types, for which the storage re- quirements depend on the actual length of column values (represented by L in the preceding table), rather than on the type's maximum possible size.  For example, a VARCHAR(10) col- umn can hold a string with a maximum length of 10 characters.  The actual storage required is the length of the string (L), plus 1 byte to record the length of the string.  For the string 'abcd', L is 4 and the storage requirement is 5 bytes. The  BLOB  and  TEXT  types require 1,  2,  3,  or 4 bytes to record the length of the column value, depending on the maximum possible length of the type.  See Section 6.2.3.2 [BLOB], page 401. If a table includes any variable-length column types, the record format will also be variable- length.  Note that when a table is created, MySQL may, under certain conditions, change a column from a variable-length type to a xed-length type, or vice-versa.  See Section 6.5.3.1 [Silent column changes], page 476. The size of an  ENUM  object is determined by the number of di erent enumeration values. One byte is used for enumerations with up to 255 possible values.  Two bytes are used for enumerations with up to 65535 values.  See Section 6.2.3.3 [ENUM], page 402. The size of a SET object is determined by the number of di erent set members.  If the set size is N, the object occupies (N+7)/8 bytes, rounded up to 1, 2, 3, 4, or 8 bytes.  A SET can have a maximum of 64 members.  See Section 6.2.3.4 [SET], page 403. 6.3  Functions for Use in SELECT and WHERE Clauses A  select_expression  or  where_definition  in a SQL statement can consist of any ex- pression using the functions described below. An expression that contains NULL always produces a NULL value unless otherwise indicated in the documentation for the operators and functions involved in the expression. Note:  there must be no whitespace between a function name and the parentheses following it.  This helps the MySQL parser distinguish between function calls and references to tables or columns that happen to have the same name as a function.  Spaces around arguments are permitted, though.
     

    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