有没有什么函数可以根据字段的内容去匹配信息

devid_desc这个字段是根据voltage和devid_name来命名的,现在我要查看devid­_desc这个字段是否包含另外两个字段的信息,用SQL怎么实现

img

供参考

select position('a' in 'abc')!=0 and position('b' in 'abc')!=0;

select locate(voltage,devid_desc)!=0 and locate(SUBSTRING(devid_name,2,LENGTH(devid_name)),devid_desc)!=0

select * from 表名 where (devid_desc like concat('%',voltage,'%')) and (devid_desc like concat('%',devid_name,'%'));
select 表名.*,if(devid_desc like concat('%',voltage,'%') and devid_desc like concat('%',substr(devid_name,3),'%'),'1','0') as check_col
from 表名