Introduction
This article will show how to list all available tables in SQLite3 using a command execution. The command execution process is in a command line interface. In this context, the execution of the command is in a command prompt. Before getting on to the execution in order to get or to list all the available tables in SQLite3, there are several things which must be available. The most important things is to have the actual SQLite3. The other thing is the execution of the command for listing the all available tables in SQLite3.
List All Available Tables in SQLite3
In this article, the following are the steps to do that :
-
Just execute the following command to be able to run the SQLite3 program, tool or command. Check the article with the title of ‘How to Install SQLite3 in Microsoft Windows’ in this link. Furthermore, just check this link which is article with the title of ‘How to Install SQLite in Ubuntu Linux using Command Line’ for another reference. So, the following is an execution sample in Microsoft Windows 10 :
Microsoft Windows [Version 10.0.18363.628] (c) 2019 Microsoft Corporation. All rights reserved. C:\Users\Personal>sqlite3 SQLite version 3.37.0 2021-11-27 14:13:22 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite>
-
Next step, just open or select the database. It is already available in the previous article. That article has the title of ‘How to Open or Select Database in SQLite3’ in this link. Just type the following command which is opening a default Django SQLite3 database or a Django project :
sqlite> .open 'C:\django\project\app\db.sqlite3' sqlite>
-
After successfully executing the command for opening or selecting the database, just execute the following command to list all available tables :
.tables
So, just type the ‘.tables’ in the SQLite3 command prompt to list all the available tables in the open or selected database as follows :
sqlite> .tables auth_group base_room auth_group_permissions base_topic auth_permission django_admin_log auth_user django_content_type auth_user_groups django_migrations auth_user_user_permissions django_session base_message sqlite>