Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT field1,field2,field3
- FROM table1
- where field3 like '%'+(SELECT distinct field from table2)+'%'
- SELECT t1.field1, t1.field2, t1.field3
- FROM
- table1 t1
- JOIN
- (SELECT distinct field AS fieldx from table2) t2
- ON t1.field3 like CONCAT('%',fieldx,'%')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement