1)select name from city where countrycode="JPN" ;
SQL查询比较
2)select name from city where countrycode='JPN' ;
3)select name from city where countrycode="jPn" ;
上述所有的查询中的查询2正在我使用单引号和在3查询我使用的混合物大写和小写字符。为什么它是产品正确的输出??。
1)select name from city where countrycode="JPN" ;
SQL查询比较
2)select name from city where countrycode='JPN' ;
3)select name from city where countrycode="jPn" ;
上述所有的查询中的查询2正在我使用单引号和在3查询我使用的混合物大写和小写字符。为什么它是产品正确的输出??。
你使用的是什么dbms? –
很明显,你的数据库服务器的语法中都允许使用两个引号。而且,比较区分大小写或不取决于为列,表或数据库配置的_collation_。 –
SQL查询通常不区分大小写 – imtheman