Friday, September 7, 2012

Case-Insensitive Search Using UPPER or LOWER


Ignoring the case in a where clause is very simple. You can, for example, convert both sides of the comparison to all caps notation:
SELECT first_name, last_name, phone_number
  FROM employees
 WHERE UPPER(last_name) = UPPER('winand');
Regardless of the capitalization used for the search term or the LAST_NAME column, the UPPER function makes them match as desired.

No comments:

Post a Comment