Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SQL query correctness/efficiency of my query

SQL query correctness/efficiency of my query

From: newsgroups <robw_at_physics.umd.edu>
Date: Mon, 26 Sep 2005 16:41:44 -0400
Message-ID: <dh9me7$amt$1@grapevine.wam.umd.edu>


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'; Received on Mon Sep 26 2005 - 15:41:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US