Test joinusing encountered ORA-25154

Source: Internet
Author: User

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,000 00, "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.

SQL> select aa. a, B, bb. c from
2 aa join bb using (B );

A B C
------------------------------

1 2 4

It seems that the connection condition appears in the query and cannot contain the table name. The test alias is feasible.


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

If the table name uses an alias, it does not seem to work.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.