How to Truncate All Tables in Sqlite Database using Java?
I know i can do this
{
...
String table_name1 = "Delete From table_name1";
String table_name2 = "Delete From table_name2";
String table_name3 = "Delete From table_name3";
String table_name4 = "Delete From table_name4";
String table_name5 = "Delete From table_name5";
stmt.executeUpdate(table_name1);
...
}
I can execute all these Strings to do the task but it increases the Lines of Code.
Is there a way to Truncate all tables in a Database with a single command, without separately typing there names?