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

    Chapter 6:  MySQL Language Reference 401 means that column values are sorted and compared in case-sensitive fashion according to the ASCII order of the machine where the MySQL server is running.  BINARY doesn't a ect how the column is stored or retrieved. The BINARY attribute is sticky.  This means that if a column marked BINARY is used in an expression, the whole expression is compared as a BINARY value. MySQL may silently change the type of a CHAR or VARCHAR column at table creation time. See Section 6.5.3.1 [Silent column changes], page 476. 6.2.3.2  The BLOB and TEXT Types BLOB is a binary large object that can hold a variable amount of data.  The four BLOB types  TINYBLOB,  BLOB,  MEDIUMBLOB, and  LONGBLOB  di er only in the maximum length of the values they can hold.  See Section 6.2.6 [Storage requirements], page 405. The four TEXT types TINYTEXT,  TEXT,  MEDIUMTEXT, and LONGTEXT correspond to the four BLOB  types  and  have  the  same  maximum  lengths  and  storage  requirements.   The  only di erence  between  BLOB  and  TEXT  types  is  that  sorting  and  comparison  is  performed  in case-sensitive fashion for BLOB values and case-insensitive fashion for TEXT values.  In other words, a TEXT is a case-insensitive BLOB. If you assign a value to a BLOB or TEXT column that exceeds the column type's maximum length, the value is truncated to t. In most respects, you can regard a TEXT column as a VARCHAR column that can be as big as you like.  Similarly, you can regard a BLOB column as a VARCHAR BINARY column.  The di erences are:    You  can  have  indexes  on  BLOB  and  TEXT  columns  with  MySQL  Version  3.23.2  and newer.  Older versions of MySQL did not support this.    There is no trailing-space removal for BLOB and TEXT columns when values are stored, as there is for VARCHAR columns.    BLOB and TEXT columns cannot have DEFAULT values. MyODBC de nes BLOB values as LONGVARBINARY and TEXT values as LONGVARCHAR. Because BLOB and TEXT values may be extremely long, you may run up against some con- straints when using them:    If you want to use GROUP BY or ORDER BY on a BLOB or TEXT column, you must convert the column value into a xed-length object.  The standard way to do this is with the SUBSTRING  function.  For example: mysql> SELECT comment FROM tbl_name,SUBSTRING(comment,20) AS substr -> ORDER BY substr; If you don't do this, only the rst max_sort_length bytes of the column are used when sorting.   The  default  value  of  max_sort_length  is  1024;  this  value  can  be  changed using the -O option when starting the mysqld server.  You can group on an expression involving BLOB or TEXT values by specifying the column position or by using an alias: mysql> SELECT id,SUBSTRING(blob_col,1,100) FROM tbl_name GROUP BY 2; mysql> SELECT id,SUBSTRING(blob_col,1,100) AS b FROM tbl_name GROUP
     

    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