oracle问题:char类型数据查询不到

select distinct id,name from test_table b where b.ID='001' ;

id为char字段类型,使用该语句查询不出数据。

解决方法:加trim()。改为:

select distinct id,name from test_table b where trim(b.ID)='001' ;

原文地址:https://www.cnblogs.com/liujiale/p/10938052.html