java.sql.SQLException: ORA-01722: 无效数目字

java.sql.SQLException: ORA-01722: 无效数字String hqlfrom Customer t where t.telephone+tel+

java.sql.SQLException: 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)。

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