Hi all,
THere is no intersect statement in MySQL. I figure out a workaround as shown below. However, I am not sure if it is correct or not. Please help.
SELECT * FROM (
SELECT DISTINCT col1 FROM t1 WHERE...
UNION ALL
SELECT DISTINCT col1 FROM t1 WHERE...
) AS tbl
GROUP BY tbl.col1 HAVING COUNT(*) = 2