我试图使用hibernate本机sql(createsqlQuery)语句删除临时表.
这是代码:
session.createsqlQuery("DROP TABLE tmp_dummy_table").executeUpdate();
但它会让我失望:
sql Error: 1003,sqlState: 24000 ORA-01003: no statement parsed Exception while creating tmp_dummy_table tableorg.hibernate.exception.GenericJDBCException: org.hibernate.exception.GenericJDBCException:could not execute query at org.hibernate.exception.sqlStateConverter.handledNonSpecificException(sqlStateConverter.java:103) at org.hibernate.exception.sqlStateConverter.convert(sqlStateConverter.java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.doList(Loader.java:2223) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) at org.hibernate.loader.Loader.list(Loader.java:2099) at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289) at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1695) at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142) at org.hibernate.impl.sqlQueryImpl.list(sqlQueryImpl.java:152) ....
最佳答案
原文链接:https://www.f2er.com/java/437947.html