如何让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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否需要将整个数据库设置为区分大小写,或者它只是某些查询的一部分。如果它是一个查询术语,那么您可以使用它们来强制区分大小写匹配:
方法签名中的 0 是执行二进制比较,为您提供所需的区分大小写。它返回一个整数。
文档
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:
The 0 in the method signature is to perform a binary comparison giving you the case sensitivity you want. It returns an integer.
Documentation
我认为你可以在 WHERE 子句之后添加整理。
I think you can add collate after the WHERE clause.