I am using sqlite3 database in a java application. How to programmatically get names of all tables in the database? I have tried google and stackoverflow as well, and could NOT find a simple solution as yet. Here is the MySqli code I use with PHP, I am trying a similar approach in Java-Sqlite3
mysqli_select_db($conn, $database);
$res = mysqli_query($conn, "SHOW TABLES FROM " . $database . "");
while($cRow = mysqli_fetch_array($res, MYSQL_NUM)) {
$namm=$cRow[0];
$query = "SELECT COUNT(*) FROM " . $namm . "";
$result = mysqli_query($conn,$query);
$rows = mysqli_fetch_row($result);
$namk = $rows[0];
echo "<li type='square' style='margin-bottom:3px;'>" . $cRow[0] . " (" . $namk . ")</li>";
}
mysqli_close($conn);
SELECT * FROM sqlite_master WHERE ...