mysql - sql select where string matches pattern defined in another table -


i have select statement this:

select * name 'a%' or name 'b%' or name 'j%' or name ... etc 

is possible store a%, b%, j% in table somewhere can more manage list , convert query like:

select * name (select * stringpatterntomatch) 

try this:

 select *      join stringpatterntomatch patt on a.name '%' + patt.pattern + '%'; 

replace patt.pattern name of column in stringpatterntomatch