In this tutorial, we will introduce you to the most commonly used SQLite commands of the sqlite3 command line program.
SQLite commands are similar to SQL commands. There are three types of SQLite commands:
- DDL: Data Definition Language
- DML: Data Manipulation Language
- DQL: Data Query Language
Data Definition Language
There are three commands in this group:
CREATE: This command is used to create a table, a view of a table or other object in the database.
ALTER: It is used to modify an existing database object like a table.
DROP: The DROP command is used to delete an entire table, a view of a table or other object in the database.
Data Manipulation language
There are three commands in data manipulation language group:
INSERT: This command is used to create a record.
UPDATE: It is used to modify the records.
DELETE: It is used to delete records.
Data Query Language
SELECT: This command is used to retrieve certain records from one or more table.
SQLite dot Command
Following is a list of SQLite dot commands. These commands are not terminated by a semicolon (;).
.help command:
Check the list of dot commands by using the ".help" at anytime.
.header on
.mode column
.timer on
Special dot commands
There are some dot commands which are used to format your output. These commands are:.header on
.mode column
.timer on
0 comments:
Post a Comment