SQL> create table aa(a number,b number);
Table created.
SQL> create table bb(b number,c number);
Table created.
SQL> insert into aa values(1,2);
1 row created.
SQL> insert into aa values(2,3);
1 row created.
SQL> insert into bb values(2,4);
1 row created.
SQL> insert into bb values(5,6);
1 row created.
SQL> commit;
Commit complete.
SQL> select aa.a,aa.b,bb.c from
2 aa join bb using(b);
select aa.a,aa.b,bb.c from
*
ERROR at line 1:
ORA-25154: column part of USING clause cannot have qualifier
SQL> !oerr ora 25154
25154, 00000, "column part of USING clause cannot have qualifier"
// *Cause: Columns that are used for a named-join (either a NATURAL join
// or a join with a USING clause) cannot have an explicit qualifier.
// *Action: Remove the qualifier.
1 2 4
看來連接條件出現在查詢中,不能帶表名,測試別名是否可行。
SQL> select x.a,x.b,y.c from
2 aa x join bb y using(b);
select x.a,x.b,y.c from
*
ERROR at line 1:
ORA-25154: column part of USING clause cannot have qualifier
如果表名采用別名,看來也不行。