<< 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 459 speci es which rows should be updated.  Otherwise, all rows are updated.  If the ORDER BY clause is speci ed, the rows will be updated in the order that is speci ed. If you specify the keyword LOW_PRIORITY, execution of the UPDATE is delayed until no other clients are reading from the table. If  you  specify  the  keyword  IGNORE,  the  update  statement  will  not  abort  even  if  we  get duplicate key errors during the update. Rows that would cause con icts will not be updated. If you access a column from  tbl_name  in an expression,  UPDATE  uses the current value of the column.  For example, the following statement sets the  age  column to one more than its current value: mysql> UPDATE persondata SET age=age+1; UPDATE  assignments are evaluated from left to right.  For example, the following statement doubles the age column, then increments it: mysql> UPDATE persondata SET age=age*2, age=age+1; If you set a column to the value it currently has, MySQL notices this and doesn't update it. UPDATE  returns the number of rows that were actually changed.  In MySQL Version 3.22 or later, the C API function mysql_info() returns the number of rows that were matched and updated and the number of warnings that occurred during the UPDATE. In MySQL Version 3.23, you can use LIMIT # to ensure that only a given number of rows are changed. 6.4.6  DELETE Syntax DELETE [LOW_PRIORITY | QUICK] FROM table_name [WHERE where_definition] [ORDER BY ...] [LIMIT rows] or DELETE [LOW_PRIORITY | QUICK] table_name[.*] [,table_name[.*] ...] FROM table-references [WHERE where_definition] or DELETE [LOW_PRIORITY | QUICK] FROM table_name[.*], [table_name[.*] ...] USING table-references [WHERE where_definition] DELETE deletes rows from table_name that satisfy the condition given by where_definition, and returns the number of records deleted. If you issue a DELETE with no WHERE clause, all rows are deleted. If you do this in AUTOCOMMIT mode, this works as  TRUNCATE.  See  Section 6.4.7 [TRUNCATE], page 460.  In MySQL 3.23, DELETE  without a  WHERE  clause will return zero as the number of a ected records.
     

    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