db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian d'Heureuse (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-2012) The Syntax of the UPDATE and DELETE statements is not correct in the reference manual
Date Sat, 28 Oct 2006 00:35:18 GMT
The Syntax of the UPDATE and DELETE statements is not correct in the reference manual
-------------------------------------------------------------------------------------

                 Key: DERBY-2012
                 URL: http://issues.apache.org/jira/browse/DERBY-2012
             Project: Derby
          Issue Type: Improvement
          Components: Documentation
            Reporter: Christian d'Heureuse
            Priority: Minor


The syntax description of the UPDATE and DELETE statements in the reference manual does not
imply that an alias name may be specified for the table name.

The statements are currently documented as:

  UPDATE table-Name
    SET ...
  DELETE FROM table-Name
    [ WHERE ... ]

This should be changed to:

  UPDATE table-Name  [ [ AS ] correlation-Name ]
    SET ...
  DELETE FROM table-Name [ [ AS ] correlation-Name ]
    [ WHERE ... ]

(Table alias names for UPDATE and DELETE are important for the WHERE clauses, e.g. when the
same table is used a second time within a subquery in the WHERE condition, e.g.:
  UPDATE table1 a
    SET ...
      WHERE EXISTS (
        SELECT * FROM table1 b WHERE a.field1 = b.field2 )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message