<< 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 451 that  are  used  with  the  LOAD DATA INFILE  statement.   See  Section  6.4.9  [LOAD DATA], page 461. In the resulting text le, only the following characters are escaped by the ESCAPED BY character:    The ESCAPED BY character    The rst character in FIELDS TERMINATED BY    The rst character in LINES TERMINATED BY Additionally, ASCII 0 is converted to ESCAPED BY followed by 0 (ASCII 48). The reason for the above is that you must escape any FIELDS TERMINATED BY, ESCAPED BY, or LINES TERMINATED BY characters to reliably be able to read the le back.  ASCII 0 is escaped to make it easier to view with some pagers. As the resulting le doesn't have to conform to the SQL syntax, nothing else need be escaped. Here follows an example of getting a le in the format used by many old programs. SELECT a,b,a+b INTO OUTFILE "/tmp/result.text" FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY "\n" FROM test_table;    If you use  INTO DUMPFILE  instead of  INTO OUTFILE,  MySQL will only write one row into the le, without any column or line terminations and without any escaping.  This is useful if you want to store a blob in a le.    Note that any le created by INTO OUTFILE and INTO DUMPFILE is going to be readable for all users!  The reason is that the MySQL server can't create a le that is owned by anyone else than the user it's running as (you should never run  mysqld  as root), the le has to be word readable so that you can retrieve the rows.    If you are using FOR UPDATE on a table handler with page/row locks, the examined rows will be write locked. 6.4.1.1  JOIN Syntax MySQL supports the following JOIN syntaxes for use in SELECT statements: table_reference, table_reference table_reference [CROSS] JOIN table_reference table_reference INNER JOIN table_reference join_condition table_reference STRAIGHT_JOIN table_reference table_reference LEFT [OUTER] JOIN table_reference join_condition table_reference LEFT [OUTER] JOIN table_reference table_reference NATURAL [LEFT [OUTER]] JOIN table_reference { oj table_reference LEFT OUTER JOIN table_reference ON conditional_expr table_reference RIGHT [OUTER] JOIN table_reference join_condition table_reference RIGHT [OUTER] JOIN table_reference table_reference NATURAL [RIGHT [OUTER]] JOIN table_reference Where table_reference is de ned as:
     

    Customer Support CentreMySQL Reference Manual

    Web Hosting Services
    UNIX WEB HOSTING
    MERCHANT ACCOUNTS
    DEDICATED SERVERS
    E-COMMERCE HOSTING
    SUPPORT & FAQ's
    TERMS OF USE
    Domain Services
    DOMAIN
    REGISTRATION
    MANAGE
    YOUR ACCOUNT
    SUPPORT & FAQ's
    TERMS OF USE
    Corporate Info
    ABOUT US
    OUR NETWORK
    CONTACT US
    SITE MAP
    Copyright © 2002 Dyntex Group, Inc. All Rights Reserved
  • 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