Oracle 1Z0-007: Displaying Data from Multiple Tables

Valid XHTML 1.0!

Displaying Data from Multiple Tables

Write SELECT statements to access data from more than one table using equality and nonequality joins

/*combined joins utilizing equality and nonequality joins*/
select last_name from player
join users on
users.contactno = player.contactno
join roles on
users.usersid =Roles.usersid
join groups on
roles.groupid = groups.groupID
where GenericColumn2 = 'yankees'
and player.contactno = '44'
and groups.groupid <> '2'

View data that generally does not meet a join condition by using outer joins

/*outer joins*/
select * from names a, age b where b.lastname = a.lastname(+);

Join a table to itself using a self-join

select * from pubs a, pubs b; select * from person c, person d;




Updated: July 30, 2005; Joe Gakenheimer