join query

  • From: "Krishan Gupta" <krishan.gupta@xxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 20 Jan 2009 11:28:50 -0600

Hi all..,

 

This may be very simple but I guess I need experts help for the
following  in oracle 10g database :-

 

select * from xx_case;

 

pos_id       case_id

2                C1

2                C2

 

 

select * from xx_box;

 

pos_id       box_id

2                B1

2                B2

 

The only common column between these two tables is pos_id.

 

How do I write query from these two tables so that the output result
would be

 

pos_id      case_id           box_id

2               C1                  B1

2               C2                  B2

2                                     B3

2                                     B3

 

 

Thanks and Regards

Krishan

 

Other related posts: