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' ;

 

posted @ 2019-05-28 16:10  caribean  阅读(1341)  评论(0编辑  收藏  举报