I would like to select all rows where field A is 'x' and field B is one of 'w', 'y' or 'z'. A and B are both strings, and I would like case to be ignored.
+4
A:
SELECT *
FROM table
WHERE LOWER(A) = 'x'
AND LOWER(B) IN ('w', 'y', 'z')
hsz
2010-09-14 11:40:58
+1
A:
select * from tablename where LCASE(A) ='x' and LCASE(B) in('w','y','z')
Sandy
2010-09-14 11:41:05
A:
I would like to select all rows where field A is 'x' and field B is one of 'w', 'y' or 'z'
... WHERE fldA = "x" AND fldB IN ("w", "y", "z") ...
A and B are both strings, and I would like case to be ignored.
Just make sure that columns' collations are set to case insensitive type, eg *utf8_unicode_ci*, *utf8_german_ci*, *latin2_general_ci* (the suffix _ci is the key).
Crozin
2010-09-14 11:41:18