Могу ли я удалить таблицу с помощью собственного SQL-запроса спящего режима

Я пытаюсь удалить временную таблицу, используя собственный 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) ....

Может Подскажите, пожалуйста, что не так в этом коде?

5
задан Kara 25 March 2014 в 00:19
поделиться