Hi @LH ,
Thanks for sharing.
We know that SQL Server is, by default case insensitive; however, it is possible to create a case sensitive SQL Server database and even to make specific table columns case sensitive. The way to determine a database or database object is by checking its “COLLATION” property and look for “CI” or “CS” in the result.
We can check whether certain columns in SQL Server are case-sensitive in advance with the following statement:
SELECT COLUMN_NAME, COLLATION_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = '<Name of the table that contains the column(s) you want to check>'
- If the output of the field contains ‘CI’, like in ‘Latin1_General_CI_AI’ then the column is case insensitive.
- If the output of the field contains ‘CS’, like in ‘Latin1_General_CS_AS’ then the column is case sensitive.
As shown below:
Best Regards,
Joy
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.