SQL query correctness/efficiency of my query
- From: "newsgroups" <robw@xxxxxxxxxxxxxxx>
- Date: Mon, 26 Sep 2005 16:41:44 -0400
Is this the correct way to join 3 tables and if so is there another more
efficient way to do it.
The 3 tables item_master,cost_item,item_comments have the common key item_no
which is the
pk in item master and the foreign key in the other 2.
It seems to work and I am checking the data for errors but there are
thousands of rows and it is slow going. I am using Oracle 9i.
Thanks Rob
select item_master.item_no,
item_comments.comment_text,
item_master.qty_on_hand,
cost_item.unit_cost,
item_master.status_flag
from item_master,cost_item,item_comments
where cost_item.item_no = item_master.item_no
and item_comments.item_no = item_master.item_no
and status_flag = 'A';
.
- Follow-Ups:
- Re: SQL query correctness/efficiency of my query
- From: Sybrand Bakker
- Re: SQL query correctness/efficiency of my query
- Prev by Date: Re: pl/sql question
- Next by Date: Re: SQL query correctness/efficiency of my query
- Previous by thread: pl/sql question
- Next by thread: Re: SQL query correctness/efficiency of my query
- Index(es):
Relevant Pages
|