Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Posts
    54

    Unanswered: self join in oracle

    i just have a simple clarification, since in self join we need to
    utilize the use of aliases to make an illusion that we are
    making a query on two tables....

    but since we are really just getting the data from 1 table is it
    okay if i just use 1 alias in the select part of my sql statement

    example

    select a.item_no, a.item_name, a.group_item_no1
    from item_master a, item_master b
    where a.item_no = b.group_item_no1;

    thanks in advance

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    That is OK, but does it get you what you want? It doesn't show you any data from the "b" copy of the table. a.item_name and b.item_name will not return the same value (in general), because they may come from different rows.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •