Hi can you please tell me how to check table name exist in data base or not
Hi can you please tell me how to check table name exist in data base or in phone gap .
I google it find this .
function populateDB(tx) {
// drop the DEMO table if it exists
tx.executeSql('DROP TABLE IF EXISTS DEMO');
// create DEMO table with columns id and data
tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');
// insert test data into DEMO table
tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")');
tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")');
}
But I don't know how to check table exist or not.?