Jeff Shapiro wrote:

If you want to be a bit more generic you could do something like this:

# store the desired OS ID into a variable
SELECT @desired_id := os_id FROM os_table WHERE os_name = "win nt";

# now find the solutions that match with the os_id
SELECT o.os_id, o.os_name, s.os_code, s.solution
FROM os_table o, solution_table s
WHERE (o.os_id & s.os_code) = @desired_id;


Why not combine them into a single intriguing non-equijoin?

SELECT *
 FROM os_table o, solution_table s
 WHERE (o.os_id & s.os_code) = o.os_id AND o.os_name = "win nt";

Bruce Feist




-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to