select phone from userInfo where phone='13372401690' and to_char(lastTime,'yyyy-MM-dd hh24:mi:ss') LIKE '%2015-02-03%' 这是输出的SQL语句,放到plsql里可以查出数据,JDBC执行时一直返回空值,这是怎么回事儿
...全文
18010打赏收藏
哪位大神给指导指导
select phone from userInfo where phone='13372401690' and to_char(lastTime,'yyyy-MM-dd hh24:mi:ss') LIKE '%2015-02-03%' 这是输出的SQL语句,放到plsql里可以查出数据,JDBC执行时一直返回空值,这是怎么回事儿
select phone from userInfo where phone='13372401690' and to_char(lastTime,'yyyy-MM-dd hh24:mi:ss') LIKE '%2015-02-03%' 将这个sql 的两个查询条件分别去查,select phone from userInfo where phone='13372401690' 和 select phone from userInfo where to_char(lastTime,'yyyy-MM-dd hh24:mi:ss') LIKE '%2015-02-03%' 看看这两个sql 通过jdbc 和 plsql 执行的结果是否相同,然后定位出具体的问题出在哪里,好想办法解决。
打出来的SQL语句就是这个select phone from userInfo where phone='13372401690' and to_char(lastTime,'yyyy-MM-dd hh24:mi:ss') LIKE '%2015-02-03%',我开始也觉得是我的代码有问题,可是之前测试的时候是好的,都没改过代码,昨天不行,今天又可以了
打出来的SQL语句就是这个select phone from userInfo where phone='13372401690' and to_char(lastTime,'yyyy-MM-dd hh24:mi:ss') LIKE '%2015-02-03%',我开始也觉得是我的代码有问题,可是之前测试的时候是好的,都没改过代码,昨天不行,今天又可以了
select phone from userInfo where phone='13372401690' and to_char(lastTime,'yyyy-MM-dd hh24:mi:ss') LIKE '%2015-02-03%' 将这个sql 的两个查询条件分别去查,select phone from userInfo where phone='13372401690' 和 select phone from userInfo where to_char(lastTime,'yyyy-MM-dd hh24:mi:ss') LIKE '%2015-02-03%' 看看这两个sql 通过jdbc 和 plsql 执行的结果是否相同,然后定位出具体的问题出在哪里,好想办法解决。