Skip to Main Content

SQL & PL/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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

outer select * from select * from 2 tables

managed BEANDec 22 2017 — edited Dec 22 2017

Hello,

I have two different tables that match some column names.

I want to select *(all) from both of them, so i do:

select q.*,h.* from dual q, dual h;

But now i need to have an 'outer' select to that:

select t.* from

(select q.*,h.* from dual q, dual h)t;

And this is giving error:

ORA-00918: column ambiguously defined

00918. 00000 - "column ambiguously defined"

The ambiguously defined column was solved in previous query.

I would like it to automatically concatenates the number with the column name as it does in first query.

pastedImage_4.png

Is there any way to achieve this?

I don“t even know how to search for this issue in order to find a proper solution.

Thanks for help

Regards,

Carlos

Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production

This post has been answered by Cookiemonster76 on Dec 22 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 19 2018
Added on Dec 22 2017
8 comments
2,351 views