数据库有4 条记录,分别是 'KKK' 'kkk' 'KkK' 'kKk'
(1)select * from t_vvip t where t.name=lower('KkK') or t.name=Upper('KkK');
仅转换了Oracle查询的字符串, 即查询的内容要么全部小写,要么全部大写。所以只能查到2条记录
(2) select * from t_vvip t where lower(t.name)='KkK'
仅转换了字段内容为小写,但查询的字符串为大小写都有, 0条
select * from t_vvip t where upper(t.name)='KkK';
仅转换了字段内容为大写,但Oracle查询的字符串为大小写都有, 0条
(3)select * from t_vvip t where lower(t.name)=lower('KkK');
即转换了字段内容又转换了Oracle查询的字符串,这样最安全,但性能也是最低的。4条