You are reading the article Different Commands With Their Uses In Sqlite updated in September 2023 on the website Benhvienthammyvienaau.com. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested October 2023 Different Commands With Their Uses In Sqlite
Definition of SQLite CommandsStart Your Free Data Science Course
Hadoop, Data Science, Statistics & others
Commands of SQLiteNow let’s see the different useful commands of SQLite as follows.
If we need to know the currently installed version of the SQLite database at that time we can execute the following command as follows.
sqlite3Explanation: In the above example we use sqlite3 command to see the currently installed version of SQLite. The output of the above command is illustrated by using the following screenshot.
If we need to check what dot commands are available then we can use the following command as follows.
.helpExplanation: When we execute the above command then it shows the different commands listed as follows.
.backup? DB? FILE: The above command is used to back up the database into the main file and it is a default file.
.database: The above-mentioned command of SQLite database is used to list all names and files that are related to the SQLite database.
.dump? Table?: Basically dump database command is an SQL text format and uses the LIKE clauses to match table patterns.
.exit: The .exit command is used to exit the SQLite prompt id we required.
.import FILE TABLE: If we need to import the data from a text file into the table at that time we can use the above command.
.indices? TABLE ?: The above command is used to show all names of indices that are present in the database. If we specify the table then it shows the only matching indices by using the LIKE pattern.
.load FILE ? ENTRY ?: Sometimes if we need to load some library at that time we can use the above-mentioned commands.
.mode MODE: By using this command we set the output mode of the SQL statement, different output modes are available as follows.
CSV: The CSV means Comma-separated values that mean we store data in the tabular format.
column: if we need to align data in some way at that time we can use this output mode and basically column is used to left-aligned.
line: If we need to show output per line that means a single value per line at that we can use this output mode.
list: If we need to show output in array format that means values delimited by using a separator string, then we can use this output mode.
tabs: This output mode is used to separate values by using the tab mode.
tcl: if we need to show output in the list at that time we use tcl output mode.
.null value STRING: If we need to print string values instead of null values at that time we can use this SQLite command.
.output FILENAME: If we need to send output to the desired filename at that time we use the above command.
.output stdout: By using this command we can send output to the screen.
.print STRING…..: If we need to print the literal string at that time we can use this command.
.prompt MAIN CONTINUE: By using this command we can replace the standard prompts as per the requirement.
.quit: It is used to exit the SQLite prompt.
.read FILENAME: If we need to use the database at that time we can use the read filename command to execute the SQL statement.
.schema ? TABLE?: If we need to show the create statement that we can use this command, if we specified a table then we can show matching content from the specified table by using the LIKE pattern.
.separator STRING: By using this command we can change the separator by using different output modes and import functions.
.show: If we need to see the current setting values at that time we can use this command to see the setting.
.table? PATTERN?: If we need to list table names as per the requirement if a specific pattern matches that is LIKE. At that, we can use this command.
.timeout MS: With the help of the above command we can open the lock table for a particular time period.
.width NUM NUM: By using this command we can see the width of the column. If column width is 0 then it selects automatically.
ConclusionWe hope from this article you have understood SQLite commands. From this article, we learned different commands with their uses in SQLite commands. We also see how we can handle the SQLite. From this article, we learned how and when we use SQLite commands.
Recommended ArticlesWe hope that this EDUCBA information on “SQLite Commands” was beneficial to you. You can view EDUCBA’s recommended articles for more information.
You're reading Different Commands With Their Uses In Sqlite
Update the detailed information about Different Commands With Their Uses In Sqlite on the Benhvienthammyvienaau.com website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!