Skip to Main Content

Live SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NEXT live SQL : Using * in a query involving multiple tables

NEXT Live SQL

In a query involving multiple tables, all columns must be explicitly specified and with aliases. If you use *, an error occurs:

select * from hr.regions r, hr.countries c

where r.region_id = c.region_id;

ORA-00918: REGION_ID: column ambiguously specified - appears in and

Columns:

select r.region_id r_id, c.region_id c_id

from hr.regions r, hr.countries c

where r.region_id = c.region_id;

R_ID C_ID
---- ----
20 20
40 40
10 10
20 20
20 20
10 10
30 30
10 10

IN “OLD” live SQL everything wors fine:

select * from hr.regions r, hr.countries c
where r.region_id = c.region_id;

Comments
Post Details
Added on Jul 22 2025
1 comment
55 views