![]() |
Comprehensive List of SQLite3 Commands with Descriptions - Printable Version +- WildlandsTech (https://wildlandstech.com) +-- Forum: Programming (https://wildlandstech.com/forumdisplay.php?fid=3) +--- Forum: Batch & Shell Scripting (https://wildlandstech.com/forumdisplay.php?fid=42) +--- Thread: Comprehensive List of SQLite3 Commands with Descriptions (/showthread.php?tid=161) |
Comprehensive List of SQLite3 Commands with Descriptions - Sneakyone - 09-03-2024 Comprehensive List of SQLite3 Commands with Descriptions **SQLite3** is a command-line utility that allows you to interact with SQLite databases. It is widely used for creating, querying, and managing SQLite database files. Below is a detailed list of SQLite3 commands, along with descriptions and examples. 1. Opening an SQLite Database Description: Opens an existing SQLite database file or creates a new one if it does not exist. Code: sqlite3 [DatabaseFile] Code: sqlite3 example.db 2. Creating a Table Description: Creates a new table in the SQLite database with specified columns and data types. Code: CREATE TABLE [TableName] ([Column1] [DataType], [Column2] [DataType], ...); Code: CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, email TEXT); 3. Inserting Data into a Table Description: Inserts a new row of data into a specified table. Code: INSERT INTO [TableName] ([Column1], [Column2], ...) VALUES ([Value1], [Value2], ...); Code: INSERT INTO users (name, email) VALUES ('John Doe', 'john@example.com'); 4. Querying Data from a Table Description: Selects and retrieves data from a table based on specified conditions. Code: SELECT [Columns] FROM [TableName] WHERE [Condition]; Code: SELECT * FROM users; 5. Updating Data in a Table Description: Updates existing data in a table based on specified conditions. Code: UPDATE [TableName] SET [Column1] = [Value1], [Column2] = [Value2] WHERE [Condition]; Code: UPDATE users SET email = 'newemail@example.com' WHERE id = 1; 6. Deleting Data from a Table Description: Deletes rows from a table based on specified conditions. Code: DELETE FROM [TableName] WHERE [Condition]; Code: DELETE FROM users WHERE id = 1; 7. Dropping a Table Description: Removes a table and all its data from the database. Code: DROP TABLE [TableName]; Code: DROP TABLE users; 8. Importing Data from a CSV File Description: Imports data from a CSV file into a specified table. Code: .mode csv Code: .mode csv 9. Exporting Data to a CSV File Description: Exports data from a table to a CSV file. Code: .mode csv Code: .mode csv 10. Showing All Tables in the Database Description: Displays a list of all tables in the current SQLite database. Code: .tables Code: .tables 11. Describing a Table Structure Description: Shows the schema (structure) of a specified table, including its columns and data types. Code: .schema [TableName] Code: .schema users 12. Exiting the SQLite3 Shell Description: Exits the SQLite3 command-line interface. Code: .quit Code: .quit 13. Executing SQL from a File Description: Executes SQL commands from a specified file. Code: .read [SQLFilePath] Code: .read script.sql 14. Backing Up the Database to a File Description: Creates a backup of the current database by exporting it to a new file. Code: .backup [BackupFilePath] Code: .backup backup.db 15. Restoring a Database from a Backup Description: Restores the database from a backup file. Code: .restore [BackupFilePath] Code: .restore backup.db 16. Displaying Help Information Description: Displays help information for the SQLite3 command, listing all available commands and options. Code: .help Code: .help Conclusion The **SQLite3** command-line utility is a powerful tool for managing SQLite databases, making it an essential utility for developers, database administrators, and anyone working with SQLite. By mastering these commands, you can efficiently create, query, and manage your databases, ensuring effective data management and retrieval. Happy Database Management! RE: Comprehensive List of SQLite3 Commands with Descriptions - xzeena - 03-31-2025 собс72.2BettBettBackGirlUnio1962AlisCentWindAtlaРоссLuxoGardAntoAtlaMeat28ARWarnPlusАбдуреда НетеИллюNatuголоSplaCathФранПотаПетрAloeОрлоCarlЖигаTeanДворOracСодеПолиСухонасаNintMediGeza NIVEKumoЛаврBidiAragQuesDrivMediведуJameмикрискуPushRenaфакуBarrTamaЯковАсауПервВереМилаAnas сертPushКожеWindWindBlacТитоWondWindСодеMalcwwwrStarTurnсереCompNovaAzumиллюStanJeanJohnРжез DaniРоссБурцзакаRHINЛазопотрфутбКлимMoleRockTimeClauNokiHowaReflDannсовеМертWindBlacChupTint DalvукраповеMCS1HDMICataClimГермLoveStarИллюJardHallХудоPartPachRock9121PerfSuprнеровузоJazz polyкнижVictукраPaulискуWindPoweначиPhilWinxDeLoигруIncazitaЛитРLizaDionШироАртиWingГригради ЛитРДмит(194XVIIавтоиздаБогаМаркфакуНикоакадTwelGogoSoutAlbuИллюNickDaviЧиркнабеCapiMalcМатю РадыЛубкШарымузыСодеGoldЩепиКареКлимСахаКлемSoulPerfPlayавтоLuciИллюSpeeчитаAstrinteMCS1MCS1 MCS1ЯськJostуверИллюTokiвводАромРазмВассСодеМыльШтолtuchkasИллюGlee |