SQL$HELP_OLD72.HLB  —  SELECT  General Form, Arguments  OPTIMIZE AS query name
    Assigns a name to the query. You can define the RDMS$DEBUG_FLAGS
    logical name or use SET FLAGS with the option 'STRATEGY' to see
    the access methods used to produce the results of the query. The
    following example shows how to use the OPTIMIZE AS clause:

    SQL> DELETE FROM EMPLOYEES E
    cont> WHERE EXISTS ( SELECT *
    cont>                FROM   SALARY_HISTORY S
    cont>                WHERE  S.EMPLOYEE_ID = E.EMPLOYEE_ID
    cont>                AND    S.SALARY_AMOUNT > 75000)
    cont> OPTIMIZE AS DEL_EMPLOYEE;
    Leaf#01 FFirst RDB$RELATIONS Card=19
       .
       .
       .
    ~Query Name : DEL_EMPLOYEE
       .
       .
       .
    7 rows deleted
Close Help