如何使SQL区分大小写

如何使SQL区分大小写

本文介绍了如何使SQL区分大小写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在域托管服务上设置了Access数据库.我通过SQL连接到它.但是,我需要所有查询都区分大小写,并且据我所知,在托管服务上设置服务器的方式不区分大小写.我可以在SQL中使用某个命令来使查询区分大小写吗?

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?

推荐答案

我认为您可以在WHERE子句后添加归类.

I think you can add collate after the WHERE clause.

SELECT col FROM table
WHERE col COLLATE Latin1_General_CS_AS = 'value'

这篇关于如何使SQL区分大小写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 03:46