Link to home
Start Free TrialLog in
Avatar of bbvic
bbvic

asked on

query

I have two tables.
orders table and ship table
For orders table,
ordernum
------------
1
2
3
4

For ship table,
ordernum        tracking_num
------------
1                           t1    
3                           t3


I want to have the Result looks like
----------------
ordernum      tracking_num
-----------      ----------------
1                         t1
2
3                         t3
4

if i do like,

select orders(*), ship(*)
from orders, ship
where orders.ordernum = ship.ordernum

it only displays two results.

but i want to display all of ordernum with tracking_num(it's ok even though it is null)

how can i do that??
ASKER CERTIFIED SOLUTION
Avatar of tdterry
tdterry
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bbvic
bbvic

ASKER

thanks