<< 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 385 A description of the other variable de nitions can be found in the startup options section, the description of SHOW VARIABLES and in the SET section.  See Section 4.1.1 [Command-line options], page 181.  See Section 4.5.6.4 [SHOW VARIABLES], page 257.  See Section 5.5.6 [SET OPTION], page 369. 6.1.6  Comment Syntax The MySQL server supports the # to end of line, -- to end of line and /* in-line or multiple-line */ comment styles: mysql> SELECT 1+1; # This comment continues to the end of line mysql> SELECT 1+1; -- This comment continues to the end of line mysql> SELECT 1 /* this is an in-line comment */ + 1; mysql> SELECT 1+ /* this is a multiple-line comment */ 1; Note that the -- (double-dash) comment style requires you to have at least one space after the second dash! Although the server understands the comment syntax just described, there are some limi- tations on the way that the mysql client parses /* ... */ comments:    Single-quote  and  double-quote  characters  are  taken  to  indicate  the  beginning  of  a quoted string, even within a comment.  If the quote is not matched by a second quote within  the  comment,  the  parser  doesn't  realise  the  comment  has  ended.   If  you  are running mysql interactively, you can tell that it has gotten confused like this because the prompt changes from mysql> to '> or ">.    A semicolon is taken to indicate the end of the current SQL statement and anything following it to indicate the beginning of the next statement. These limitations apply both when you run mysql interactively and when you put commands in a le and tell mysql to read its input from that le with mysql < some-file. MySQL supports the `--' ANSI SQL comment style only if the second dash is followed by a space.  See Section 1.7.4.7 [ANSI di comments], page 40. 6.1.7  Is MySQL Picky About Reserved Words? A common problem stems from trying to create a table with column names that use the names of datatypes or functions built into MySQL, such as  TIMESTAMP  or  GROUP.  You're allowed  to  do  it  (for  example,  ABS  is  an  allowed  column  name),  but  whitespace  is  not allowed between a function name and the immediately following `(' when using functions whose names are also column names. The following words are explicitly reserved in MySQL. Most of them are forbidden by ANSI SQL92 as column and/or table names (for example,  GROUP).  A few are reserved because MySQL needs them and is (currently) using a yacc parser:
     

    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