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

 

相关文章:

  • 2022-12-23
  • 2021-12-29
  • 2021-05-13
  • 2021-08-02
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2021-05-07
猜你喜欢
  • 2022-12-23
  • 2021-08-02
  • 2021-12-14
  • 2022-12-23
  • 2021-11-11
  • 2021-12-01
  • 2022-12-23
相关资源
相似解决方案