HomeHome  FAQFAQ  SearchSearch  RegisterRegister  MemberlistMemberlist  UsergroupsUsergroups  Log in  

Share | 
 

 JOINS (inner, outer)

Go down 
AuthorMessage
Abhilash

avatar

Number of posts : 228
Age : 34
Registration date : 2007-03-05

PostSubject: JOINS (inner, outer)   Wed Jul 18, 2007 5:32 pm

JOINS (inner, outer)

suppliers(S_id and S_ name)
S_id S_name
10000 IBM
10001 Hewlett Packard
10002 Microsoft
10003 Nvidia

orders(O_id, S_id, and O_date)
O_id s_id O_date
500125 10000 2003/05/12
500126 10001 2003/05/13

INNER JOIN(simple join)

SELECT suppliers.S_id, suppliers.S_name, orders.O_date
FROM suppliers, orders
WHERE suppliers.S_id = orders.S_id;


Result set would look like this:

S_id S_name O_date
10000 IBM 2003/05/12
10001 Hewlett Packard 2003/05/13


OUTER JOIN

SELECT suppliers.S_id, suppliers.S_name, orders.O_date
FROM suppliers, orders
WHERE suppliers.S_id = orders.S_id(+);


Result set would look like this:

S_id S_name O_date
10000 IBM 2003/05/12
10001 Hewlett Packard 2003/05/13
10002 Microsoft <null>
10003 Nvidia <null>
Back to top Go down
View user profile
 
JOINS (inner, outer)
Back to top 
Page 1 of 1
 Similar topics
-
» Pain on brow bone
» A Yoshi Fan Joins FM Design

Permissions in this forum:You cannot reply to topics in this forum
 :: Programming Languages :: ORACLE-
Jump to: