Oracle 5.0 Reference Manual page 1115

Table of Contents

Advertisement

Alternatively, avoid the use of the comma operator and use
SELECT * FROM t1 JOIN t2 JOIN t3 ON (t1.i1 = t3.i3);
This change also applies to statements that mix the comma operator with
JOIN,
LEFT
operator.
• Previously, the
refer only to its operands.
Example:
CREATE TABLE t1 (i1 INT);
CREATE TABLE t2 (i2 INT);
CREATE TABLE t3 (i3 INT);
SELECT * FROM t1 JOIN t2 ON (i1 = i3) JOIN t3;
Previously, the
'i3' in 'on clause'
clause. The statement should be rewritten as follows:
SELECT * FROM t1 JOIN t2 JOIN t3 ON (i1 = i3);
• Resolution of column names in
names that are outside the
previously. That is, in cases when MySQL formerly issued an error that some column is ambiguous,
the query now is handled correctly. This is due to the fact that MySQL now treats the common
columns of
the query compiler does not consider them as ambiguous.
Example:
SELECT * FROM t1 NATURAL JOIN t2 WHERE b > 1;
Previously, this query would produce an error
clause is
+------+------+------+
| b
| c
+------+------+------+
|
4 |
+------+------+------+
One extension of MySQL compared to the SQL:2003 standard is that MySQL enables you to qualify
the common (coalesced) columns of
disallows that.
13.2.8.3. Index Hint Syntax
You can provide hints to give the optimizer information about how to choose indexes during query
processing.
statement. The syntax for an individual table, including that for index hints, looks like this:
SELECT
tbl_name
[[AS] alias] [index_hint]
index_hint:
USE {INDEX|KEY} [FOR JOIN] (index_list)
| IGNORE {INDEX|KEY} [FOR JOIN] (index_list)
| FORCE {INDEX|KEY} [FOR JOIN] (index_list)
index_list:
index_name
JOIN, and
JOIN, all of which now have higher precedence than the comma
RIGHT
clause could refer to columns in tables named to its right. Now an
ON
statement was legal. Now the statement fails with an
SELECT
error because
NATURAL
FROM
or
joins as a single column, so when a query refers to such columns,
NATURAL
USING
ambiguous. Now the query produces the correct result:
| y
|
2 |
3 |
Section 13.2.8.2,
"JOIN
[, index_name] ...
Syntax
SELECT
is a column in t3, which is not an operand of the
i3
or
joins is different than previously. For column
USING
clause, MySQL now handles a superset of the queries compared to
ERROR 1052 (23000): Column 'b' in where
or
NATURAL
USING
Syntax", describes the general syntax for specifying tables in a
1095
instead:
JOIN
INNER
Unknown column
joins (just as previously), while the standard
JOIN,
CROSS
clause can
ON
ON

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents