OK, the title is confusing but let me explain.
Let’s say that I have a employee skills database for which I would like managers to be able to search through.
A manager may want to search for employees with nunchuck skills…
Ok, great, thats easy:
SELECT * FROM skilllist WHERE skillname= "nunchuck"
Bam! I got a list of employees with nunchuck skills.
But say a manager would like to get a list of employees with both “nunchuck” skills and “bow staff” skills. How can I create a query like that? I can’t just say:
SELECT * FROM skilllist WHERE skillname= "nunchuck" AND skillname= "bow staff"
or
SELECT * FROM skilllist WHERE skillname= "nunchuck" OR skillname= "bow staff"
The latter would just return all employees with nunchuck skills and all employees with bow staff skills. I would like to get ONLY employees with both skills. I can’t figure it out. Please help! 🙂
1 Answer