Hibernate执行原生态sql语句
时间:2021-07-01 10:21:17
帮助过:3人阅读
public Integer update(String id, String username){
String sql = "
update Team_CheLiang
set username
=:username
where id
=:id";
Query query=this.getSession().createSQLQuery(sql);
query.setString("username", username);
query.setString("id", id);
return query.executeUpdate();
}
Hibernate执行原生态sql语句
标签: