using (SQLiteConnection connection = new SQLiteConnection(connectionString)) { connection.Open(); DataTable tableNames = connection.GetSchema("Tables"); foreach (DataRow row in tableNames.Rows) { Console.WriteLine(row["TABLE_NAME"].ToString()); } }
using (SQLiteConnection connection = new SQLiteConnection(connectionString)) { connection.Open(); DataTable columns = connection.GetSchema("Columns"); foreach (DataRow row in columns.Rows) { Console.WriteLine(row["TABLE_NAME"].ToString() + "." + row["COLUMN_NAME"].ToString()); } }This code retrieves a DataTable object containing information about all columns in all tables in the database. The code then iterates through each row in the table and prints out the full column name (including the table name).