has the following two tables:
Table a field:
id,tag
Table b field:
id,title
< H2 > query purpose: < / H2 >when the tag of table an is contained in the title of table b, it is queried
< H2 > the current code looks something like this: < / H2 > select a.tag from a with (nolock)
left outer join b with (nolock)
on charindex (a.tagg, b.title) > 0
according to my code, it takes a long time to execute. Is there a better way to write it? Thank you!