[email protected] and ...">

当前位置:网站首页>SQL Server查询区分大小写

SQL Server查询区分大小写

2022-06-10 20:59:00 sichuanwww

默认情况下,select语句是不区分大小写的,语句形式为:

               string strSelect = "select UserName from UserInfor where

                        UserName [email protected] and

                        UserPWD  [email protected]";

  string strSelect = "select UserName from UserInfor where

                        UserName [email protected] and

                        UserPWD  [email protected]";

如果需要区分大小写,则需要写成:

         string strSelect = "select UserName from UserInfor where

                        UserName collate [email protected] and

                        UserPWD collate [email protected]";

 string strSelect = "select UserName from UserInfor where 

                        UserName collate [email protected] and 

                        UserPWD collate [email protected]";


  

原网站

版权声明
本文为[sichuanwww]所创,转载请带上原文链接,感谢
https://sichuanwww.blog.csdn.net/article/details/125082848