SELECT JOIN problem
Posted: Tue Apr 15, 2008 12:25 am
Hye everybody,
I'm new to SQL and this is my first problem that I encounter.
I have two tables, stf_info that stores staff details and stf_login that stores staff who has admin privilege information. How do i select staff from table stf_info who doesn't has admin privilege? I try code below but the result came out multiple times.
Result :
MICHAEL
MICHAEL
MICHAEL
JENNY
JENNY
JENNY
DAVID
DAVID
DAVID
Thank you for your help.
I'm new to SQL and this is my first problem that I encounter.
I have two tables, stf_info that stores staff details and stf_login that stores staff who has admin privilege information. How do i select staff from table stf_info who doesn't has admin privilege? I try code below but the result came out multiple times.
Code: Select all
SELECT stf_info.stf_name FROM stf_login INNER JOIN stf_info ON stf_login.stf_id<>stf_info.stf_idMICHAEL
MICHAEL
MICHAEL
JENNY
JENNY
JENNY
DAVID
DAVID
DAVID
Thank you for your help.