java.sql.SQLSyntaxErrorException: ORA-01722: 无效数字

String hql="from Customer t where t.telephone='"+tel+"'";//可以  
String hql="from Customer t where t.telephone="+tel;//报错

 查原因:估计是oracle会将变化一下where to_numer( t.telephone)。

所以出现以上错误,转化一下试试

http://lin213-213.iteye.com/blog/1312191 原作者

posted @ 2015-10-28 14:02  JarvisLau  阅读(5749)  评论(0编辑  收藏  举报