SHARE
TWEET

Untitled

a guest Aug 20th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT field1,field2,field3
  2. FROM table1
  3. where field3 like '%'+(SELECT distinct field from table2)+'%'
  4.      
  5. SELECT t1.field1, t1.field2, t1.field3
  6. FROM
  7.     table1 t1
  8.     JOIN
  9.     (SELECT distinct field AS fieldx from table2) t2
  10.     ON t1.field3 like CONCAT('%',fieldx,'%')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top