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

    34 MySQL Technical Reference for Version 4.0.3 mysql> SELECT col1=1 AND col2=2 FROM tbl_name;    The LAST_INSERT_ID() function. See Section 8.4.3.30 [mysql_insert_id()], page 580.    The REGEXP and NOT REGEXP extended regular expression operators.    CONCAT()  or  CHAR()  with  one  argument  or  more  than  two  arguments.   (In  MySQL Server, these functions can take any number of arguments.)    The BIT_COUNT()CASEELT()FROM_DAYS()FORMAT()IF()PASSWORD()ENCRYPT(), MD5(), ENCODE()DECODE(), PERIOD_ADD(), PERIOD_DIFF(), TO_DAYS(), or WEEKDAY() functions.    Use of TRIM() to trim substrings. ANSI SQL only supports removal of single characters.    The GROUP BY functions STD()BIT_OR(), and BIT_AND().    Use of REPLACE instead of DELETE + INSERT.  See Section 6.4.8 [REPLACE], page 461.    The FLUSHRESET and DO statements.    The ability to set variables in a statement with :=: SELECT @a:=SUM(total),@b=COUNT(*),@a/@b AS avg FROM test_table; SELECT @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3; 1.7.4  MySQL Di erences Compared to ANSI SQL92 We try to make MySQL Server follow the ANSI SQL standard and the ODBC SQL standard, but in some cases MySQL Server does things di erently:    For  VARCHAR  columns, trailing spaces are removed when the value is stored.  See  Sec- tion 1.7.5 [Bugs], page 40.    In  some  cases,   CHAR  columns  are  silently  changed  to  VARCHAR  columns.    See  Sec- tion 6.5.3.1 [Silent column changes], page 476.    Privileges for a table are not automatically revoked when you delete a table.  You must explicitly  issue  a  REVOKE  to  revoke  privileges  for  a  table.   See  Section  4.3.1  [GRANT], page 212.    NULL AND FALSE will evaluate to NULL and not to FALSE.  This is because we don't think it's good to have to evaluate a lot of extra conditions in this case. For a prioritised list indicating when new extensions will be added to MySQL Server, you should consult the online MySQL TODO list at http://www.mysql.com/documentation/manual That is the latest version of the TODO list in this manual. See Section 1.8 [TODO], page 43. 1.7.4.1  SubSELECTs MySQL Server currently only supports nested queries of the form INSERT ... SELECT ... and REPLACE ... SELECT ....  You can, however, use the function IN() in other contexts. Subselects are currently being implemented in the 4.1 development tree. Meanwhile, you can often rewrite the query without a subselect: SELECT * FROM table1 WHERE id IN (SELECT id FROM table2); This can be rewritten 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