Forum Stats

  • 3,838,686 Users
  • 2,262,394 Discussions
  • 7,900,730 Comments

Discussions

allow alias.* in conjunction with join ... alias using(..)

TPD-Opitz
TPD-Opitz Member Posts: 2,465 Silver Trophy
edited Jan 11, 2016 5:43PM in Database Ideas - Ideas

currently  (up to 12c) I get an error message when I write

select t2.* from table1 join table2 t2 using(the_common_Attribute)


When writing this I want all attributes from t2 which are not used in any USING() clause of the Statement.

I want to write "the_common_arttibute" explicitly in the Attribute list if it is needed there

bye

TPD

TPD-OpitzctriebManish Chaturvedi
6 votes

Active · Last Updated

Comments

  • abhinivesh.jain
    abhinivesh.jain Member Posts: 307 Blue Ribbon

    Please give more details on what is the error and what is the idea here.

  • TPD-Opitz
    TPD-Opitz Member Posts: 2,465 Silver Trophy

    Please give more details on what is the error and what is the idea here.

    I often have to write complex queries for analysing data corruption or alike. then I usually want to see fields from a single table while all the other tables are needed to reduce the query result.

    Since the attributes holding the primary/foreign key relationship have same name in the tables the writing of the statement speeds up when I can use the USING() clause for joinig the tables.

    But if I do so I cannot use alias.* to show all the (remaining) attributes of a single table. Oracle gives me an error message (Alias not alowed...)

    bye

    TPD