I need to delete all the rows in an Apache Derby database in Java.
If I execute statement.executeUpdate("DELETE FROM TABLENAME WHERE CONDITION=")
it works, but if I try statement.executeUpdate("DELETE FROM TABLENAME")
it does not delete all the rows. I tried TRUNCATE
and it does not work either.
Any ideas.
Use dummy condition to delete all the records :
DELETE FROM TABLENAME WHERE 1=1;