There is a request:

SELECT * FROM tbl WHERE wage > 100 AND people = 

The question is what should I write after people = (equals sign) so that it is equivalent to all the values ​​in the people column?

  • According to your question do not guess what you ask! Re-formulate your question. - ovr

2 answers 2

 SELECT * FROM tbl WHERE wage > 100 AND people = people 
  • Is it possible both with the operator like '%', but only with the comparison operator = '%'? - Vlad
  • SELECT * FROM tbl WHERE wage> 100 AND people = '%' - Vlad
  • To do this, use LIKE, not "=". - msi

Nothing to write. Just remove the extra condition.

 SELECT * FROM tbl WHERE wage > 100 
  • ))) It is necessary with this condition, but that was equivalent to all the values ​​from the people column, are there options? - Vlad
  • @ Vlad, why? It will not affect the result of the request. - Arentheal
  • one
    In people, the value of the variable will come. It is necessary that, if necessary, a string comes there, equivalent to all values. - Vlad
  • So variable or just SQL, you specify that you want to receive as a result. - Vartlok
  • It is possible to create such a query: SELECT * FROM tbl WHERE wage> 100 AND people = '%' - Vlad