I want to create the following types of query with the query builder, but the WHERE CONDITION field in the Query Builder only allows one constant.
SELECT <some_column> from <table>
WHERE <column1> = <constant1>,
AND <column1> = <constant2>,
AND <column1> - <constant3>,
... etc
How do I generate this query?
The issue is best understood with an example. An employee of an given company will very like only have one employee ID and not more than one.
The query
SELECT Last_Name from Employees
WHERE employee_id = 10,
AND employee_id = 20;
means that you want to return the last name of an employee that has an ID of 10 AND an ID of 20. It does NOT say, please return two employees; one with ID = 10 and another with ID = 20.
Running the above query will always return no rows. Hence, Query Builder does not give you a means to produce a WHERE clause with one column being set to multiple constants with AND operators.