//刪除數(shù)據(jù) /* int a=session.delete("from Hello_Bean where id=1");//假如沒有找到id為1的數(shù)據(jù)那么返回0,假如找到返回1,這里的Hello_Bean是我們的Hello_Bean類,他跟數(shù)據(jù)庫表對應(yīng),所以我們在這里是直接用Hello_Bean來代碼數(shù)據(jù)庫表的。 System.out.println(a); session.flush(); session.close();