Skip to content
Advertisement

How do you make your check constraint case insensitive in SQL?

This is my piece of code.

I want to be able to insert values in lower case too. Example down Below:

But I can edit my check constraints to add ‘Web Site’ or ‘Catalog’, I just want to try something else. Thanks.

Advertisement

Answer

You may lowercase the column and then compare to lowercase string literals:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement