how understand one result set is subset of another in twomysql select result set ?

Posted by Ehsan Khodarahmi on Stack Overflow See other posts from Stack Overflow or by Ehsan Khodarahmi
Published on 2010-04-05T08:27:01Z Indexed on 2010/04/05 8:33 UTC
Read the original article Hit count: 241

Filed under:
|
|

Hi I've 2 mysql select statements, suppose these are my queries & their result :

Statement 1 :

select id from a

which returns this result set : { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }

Statement 2 :

select id from b

which returns this result set : { 3, 5, 10 }

I want to write a query which determines whether resultset1 contains all records of resultset2 or not. I think needs a simple query, any suggestion ???

© Stack Overflow or respective owner

Related posts about mysql

Related posts about select