devxlogo

Case Sensitivity in Searches

Case Sensitivity in Searches

Question:
How can I ignore case when trying to SELECT allrecords that are LIKE a certain string variable? I have an employee’s name field in which the charactersare a combination of lower and upper case letters.I do not want users to be concerned about case when doing searches.

Answer:
The easiest solution is to write your queries using the UPPER() function (or whatever exact syntax your product supports):

    … WHERE UPPER(column)=’NAME’;
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist