mercredi 9 décembre 2015

How to check table exist in sqlite using java

How to check if table exist in sqlite using java.

I have used the code

 String sql = "SELECT count(*) FROM sqlite_master WHERE type = 'table' AND name = 'COMPANY'";
 System.out.println("Sql Sqlite" + sql);
 int i = stmt.executeUpdate(sql);

Dont Know its correct or not, I'm new to sqlite please help.

Aucun commentaire:

Enregistrer un commentaire