table
id | catid | productid |
1 3 100
2 244 110
3 400 300
Hi, here is my query ,
select catid from table where catid NOT IN ('3','244','5')
i have a table looking like that above ,
1- what i need ,i have to check some list of catid values , if all the list catid is available an the table will return "yes" or some "rows".
2- Otherwise will return "no" all the list catid not available ?
I had tried but its useless ?
This is not correct one for my expecting result ?
SELECT catid , IF(catid IS NOT NULL , "Yes" , "No") FROM table where catid IN ('3','244','5');
what i need , the list of cat ids are "('3','244','5')" should be available an the table if once value missing an the table will return "No"
thanks for your help ?