Deleting data in SQL table using Hibernate
<p>I want to delete data from a mysql table if its with current date.</p>

<p>This is the code I wrote and is showing an exception at line "ERROR":</p>

<p>What is the procedure to delete data from tables with a where condition applied?</p>

<pre><code>                    Date date=new Date();

                     SimpleDateFormat myFormat=new SimpleDateFormat("dd-MM-yyyy");

                     String todayDate=myFormat.format(date);

                    String query="delete * from today_list where today_date="+"'"+todayDate+"'";    
        Transaction t1=session.beginTransaction();  
        session.createQuery(query).executeUpate();//ERROR
                    t1.commit();
</code></pre>
