Find SQLite Column Names in Empty Table
PRAGMA table_info( your_table_name );
doesn't work in HTML5 SQLite.
Here is a small HTML5 SQLite JavaScript Snippet which gets the column names from your_table_name even if its empty. Hope its helpful.
tx.executeSql('SELECT name, sql FROM sqlite_master WHERE type="table" AND name = "your_table_name";', [], function (tx, results) { var columnParts = results.rows.item(0).sql.replace(/^[^\(]+\(([^\)]+)\)/g, '$1').split(','); var columnNames = []; for(i in columnParts) { if(typeof columnParts[i] === 'string') columnNames.push(columnParts[i].split(" ")[0]); } console.log(columnNames); ///// Your code which uses the columnNames;});