Oracle 跟踪的语句 char(2) 工具能查出来,MyBatis 程序中查不出来?
例如:user_table 的 state定义 char(2)
select * from user_table u where u.state = '0';
使用工具能查出来,结果程序中查不出来。
原因:
因为char(2),不足2位会补空格的.。
select * from user_table u where trim(u.state) = '0';
Oracle 跟踪的语句 char(2) 工具能查出来,MyBatis 程序中查不出来?
例如:user_table 的 state定义 char(2)
select * from user_table u where u.state = '0';
使用工具能查出来,结果程序中查不出来。
原因:
因为char(2),不足2位会补空格的.。
select * from user_table u where trim(u.state) = '0';