This article describes how to connect to SQLite from the command line using the sqlite3 program. You can use the sqlite3 program as a quick and easy way to access SQLite databases directly.
To connect to SQLite from the command line, follow these steps:
sqlite3 example.db
After you access a database, you can use regular SQL statements to run queries, create tables, insert data, and more. Additionally:
.tables
To view the structure of a table, type the following command at the sqlite> prompt. Replace table with the name of the table that you want to view:
.schema table
What is SQLite?
SQLite is a lightweight database management solution. It offers its users a high-performance, very dependable SQL database engine. SQLite's code is available within public domain making it free for use for every private or commercial purpose. SQLite has been built into every mobile device and almost every computer. In fact, SQLite is the world's most widely used database engine.
SQLite is a unique SQL solution because it doesn't require a separate server process. Instead, it reads and writes right on disk files. A disk file contains a comprehensive SQL database complete with multiple tables, views and triggers. As a cross-platform file format, you are able to copy between 32-bit and 64-bit storage systems.
SQLite is:
SQLite history
Software developer Dwayne Richard Hipp, while working for General Dynamics, wrote SQLite in early 2000 while on contract with the US Navy. SQLite was originally a Tcl extension. The goal of SQLite was to create a solution that didn't require a database management solution or have the need for a database administrator. Hipp wrote the SQLite syntax close to that of PostgreSQL.
Learn more about SQLite
man sqlite3
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.
We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.