我关注了mySQL表:
ID Name Country Industry
1 Abc IN Computer Software
2 Xyz US Banking
3 Mno AU Business Services
4 Pqr FR Media
我有以下两个清单:
Country = [US, IN, NL, SA, SL],
Industry = [Computer Software, Computer Hardware, Construction, Business Services, Electronics]
我需要一个mySQL查询来执行以下任务:
答案 0 :(得分:0)
使用此查询
从table_name中选择*其中Country不在('US','IN','NL','SA','SL')或行业不在('计算机软件','计算机硬件','构造' ,'商业服务','电子')
答案 1 :(得分:0)
使用此
SELECT * FROM TABLE_NAME
WHERE
Country NOT FIND_IN_SET(Country , 'US, IN, NL, SA, SL')
OR NOT FIND_IN_SET(Industry, 'Computer Software, Computer Hardware, Construction, Business Services, Electronics')