Rules of Precedence

The database server uses the following precedence rules to interpret dot notation:
  1. schema name_a . table name_b . column name_c . field name_d
  2. table name_a . column name_b . field name_c . field name_d
  3. column name_a . field name_b . field name_c . field name_d
When the meaning of an identifier is ambiguous, the database server uses precedence rules to determine which database object the identifier specifies. Consider the following two tables:
CREATE TABLE b (c ROW(d INTEGER, e CHAR(2));
CREATE TABLE c (d INTEGER);
In the following SELECT statement, the expression c.d references column d of table c (rather than field d of column c in table b) because a table identifier has a higher precedence than a column identifier:
SELECT * 
   FROM b,c 
      WHERE c.d = 10;

For more information about precedence rules and how to use dot notation with ROW columns, see the HCL OneDB™ Guide to SQL: Tutorial.