sql - How to create query to select records which contain any of the defined values in any row? -


The table includes column columns, column 2, column_3.

String values ​​set (string 1, string 2, ... string 10) to include string 1 or string 2 or ... or string 10 in all rows in column_1 or column 2 You must create a query.

If someone has suggested

first I made a statement

  "select ... from ... where column_1 = string1 Or column_2 = string 1 or column_1 = string 2 or column_2 = string 2 or ... or column_2 = string 10 " 

but the query is too long, though this type of query A method for writing can be made.

  SELECT ... to ... in WHERE column_1 (string1, string2 .. String10) or in column 2 (string 1, string 2 ... string 10)  

I saw that you have included but you actually test for equality They are 2 different things and the query is completely different, which you actually mean by .


Comments