hibernate使用truncate清空表 截断表

  public void truncateTable(Session session, String tableNameInDb) {
        String sql = " truncate table  " + tableNameInDb;
        Query query = session.createSQLQuery(sql);
        query.executeUpdate();
    }

猜你喜欢

转载自www.cnblogs.com/jnhs/p/12095976.html