直接上代码 String hsql = "delete XTable x where x.Userid= ?"; Query query = this.getSession().createQuery(hsql); query.setString(0, "001"); query.executeUpdate();