区分大小写的登录字段 [英] case sensitive login field
本文介绍了区分大小写的登录字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我做了一个插入查询用作注册和选择查询作为登录和检查,但问题是。它没有检查大写如何我把它放在我的小规模app中。
i have made a insert query used as registration and select query as login and checking but the problem is. it doesnt check for upper case how can i put that in my small scale app.
推荐答案
你需要告诉SQL使用区分大小写的排序规则。
在你的SQL中执行此操作:
You need to tell SQL to use a collation that is case sensitive.
Do this in your SQL:
WHERE password = @password COLLATE SQL_Latin1_General_CP1_CS_AS and Username=@Username
告诉SQL以区分大小写的方式处理password = @password。
That tells SQL to treat "password = @password" with case sensitivity.
对于SQL,您可以使用 COLLATE。 [ ^ ]。
以下是链接 [ ^ ]给你。
祝你好运,
OI
For SQL you can use COLLATE.[^].
Here is an example link[^] for you.
Good luck,
OI
这篇关于区分大小写的登录字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文