Hello,
How can I query data from a table available on a list of strings?
I only want to get the data from the list of strings.
Example:
Table
ID Name
1 Big
2 Small
3 Extra
4 Orange
5 Drink
List of Strings:
Big
Small
Extra
Thanks!
Hello,
How can I query data from a table available on a list of strings?
I only want to get the data from the list of strings.
Example:
Table
ID Name
1 Big
2 Small
3 Extra
4 Orange
5 Drink
List of Strings:
Big
Small
Extra
Thanks!
SELECT * FROM theTable WHERE column_name IN ('Big', 'Small', 'Extra')
I assume you want the MySQL IN clause:
SELECT ID, Name FROM TableName WHERE Name IN ('Big','Small','Extra')