This one also works:
SELECT * FROM table WHERE 3 IN (NUMBERS) AND 15 IN (NUMBERS)
using the IN will look into a comma separated string eg. these two
WHERE banana IN ('apple', 'banana', 'coconut')
WHERE 3 IN (2,3,6,8,90)
More Related Contents:
- SQL select only rows with max value on a column [duplicate]
- What is the error “Every derived table must have its own alias” in MySQL?
- Generating Depth based tree from Hierarchical Data in MySQL (no CTEs)
- Authentication plugin ‘caching_sha2_password’ cannot be loaded
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- How to grant remote access permissions to mysql server for user?
- Generating a series of dates [duplicate]
- Oracle Database Link – MySQL Equivalent?
- How to escape single quotes in MySQL
- MySQL comparison with null value
- Why is the estimated rows count very different in phpmyadmin results?
- Slow query when using ORDER BY
- How to import XML file into MySQL database table using XML_LOAD(); function
- Unique constraint that allows empty values in MySQL
- Matching all values in IN clause
- INTERSECT in MySQL
- Having both a Created and Last Updated timestamp columns in MySQL 4.0
- MySQL select with CONCAT condition
- What does SQL clause “GROUP BY 1” mean?
- Bogus foreign key constraint fail
- MySQL SELECT LIKE or REGEXP to match multiple words in one record
- Syntax error when using except in a query
- Easiest way to copy a table from one database to another?
- sql like operator on integer
- The best way to remove value from SET field?
- How to import large sql file in phpmyadmin
- How to figure out size of Indexes in MySQL
- Equivalent of MSSQL IDENTITY Column in MySQL
- #1060 – Duplicate column name ‘id’
- Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user ‘root’@’localhost'(using password:YES)