
How to access min value of column from database table?

Hi Samar,
You can access minimum value of column from database. With the help of this code...
public void MinValue() {
Session session= HibernateUtil.getSessionFactory().openSession();
String selectQuery ="select min(id) from QuestionModel result_info";
Query query = session.createQuery(selectQuery);
System.out.println("Min Value : " +query.list().get(0));
}
Thanks..
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.