Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make SQL case sensitive

I have an Access database set up on a domain hosting service. I am connecting to it through SQL. However, I need all of my queries to be case sensitive, and as far as I know the way the server is set up on the hosting service is it's NOT case sensitive. Is there a certain command that I could use in my SQL which would make the query case sensitive?

like image 460
futurevilla216 Avatar asked Feb 24 '23 10:02

futurevilla216


1 Answers

Do you need to set the entire DB to case sensitive, or is it just part of some queries. If it is a query term then you can use these to force case sensitive matching:

StrComp("A","a",0)

The 0 in the method signature is to perform a binary comparison giving you the case sensitivity you want. It returns an integer.

WHERE StrComp('myText1', 'MYTeXt1', 0) = 0

Documentation

like image 50
Dustin Laine Avatar answered Mar 07 '23 03:03

Dustin Laine