SQLite

This section explains how to use the SQLite database. SQLite usually runs inside a single application rather than as a database server. It is easy to install and very compact, so it is often distributed together with applications. Here, each topic walks through how to use SQLite to create databases and tables, add data, and query data.
SQLite | Table
- SQLite | Tables | Creating a Table
- SQLite | Table | Inspecting a Table Schema
- SQLite | Tables | Rename a Table and Add or Remove Columns
- SQLite | Table | Dropping a Table
- SQLite | Tables | PRIMARY KEY Constraint
- SQLite | Tables | ROWID and INTEGER PRIMARY KEY
- SQLite | Tables | AUTOINCREMENT Allocation Rules
- SQLite | Table | NOT NULL Constraint
- SQLite | Tables | UNIQUE Constraint
- SQLite | Tables | DEFAULT Constraint
- SQLite | Tables | CHECK Constraint
SQLite | Querying Data
- SQLite | Query Data | Retrieve Data with SELECT
- SQLite | Query Data | Sort Rows by Column Values (ORDER BY)
- SQLite | Querying Data | Setting Query Conditions with WHERE
- SQLite | Query Data | Compare Against a Range of Values (BETWEEN Clause)
- SQLite | Query Data | Compare Against a List of Values (IN Clause)
- SQLite | Querying Data | Pattern Matching with LIKE
- SQLite | Querying Data | Pattern Matching with GLOB
- SQLite | Query Data | Find Rows with NULL Values (IS NULL)
- SQLite | Query Data | Assign Column Aliases (AS Clause)
- SQLite | Query Data | Remove Duplicate Rows with DISTINCT
- SQLite | Querying Data | LIMIT and OFFSET
- SQLite | Query Data | Calculate Arithmetic Expressions from Column Values
- SQLite | Query Data | Return Conditional Results with CASE
- SQLite | Querying Data | GROUP BY and HAVING
SQLite | SQLite Commands
- SQLite | SQLite Commands | Viewing Current Settings (.show Command)
- SQLite | Commands | Changing Output Format with .mode
- SQLite | SQLite Commands | Show Column Names in SELECT Results (.headers)
- SQLite | SQLite Commands | Change the SELECT Result Separator (.separator)
- SQLite | SQLite Commands | Set Column Widths in Column Mode (.width)
- SQLite | SQLite Commands | Import CSV Data from a File (.import)
- SQLite | SQLite Commands | Database Dump (.dump)
- SQLite | SQLite Commands | Rebuilding a Database from a Dump (.read Command)
- SQLite | Commands | Writing SELECT Results to a File with .output
- SQLite | SQLite Commands | Back Up and Restore a Database (.backup/.restore)
SQLite | SQLite Functions
- SQLite | SQLite Functions | Counting Rows in a Column or Table (count Function)
- SQLite | SQLite Functions | Calculate Column Totals with sum and total
- SQLite | SQLite Functions | Calculate an Average with avg
- SQLite | SQLite Functions | Finding Maximum and Minimum Column Values (max and min Functions)
- SQLite | SQLite Functions | Concatenating Column Values (group_concat Function)
- SQLite | Functions | Date and Time Functions
- SQLite | SQLite Functions | Returning the Number of Characters in a String (length Function)
- SQLite | SQLite Functions | Converting Strings to Uppercase or Lowercase (lower and upper Functions)
- SQLite | SQLite Functions | Replacing Part of a String (replace Function)
- SQLite | SQLite Functions | Extracting Part of a String (substr Function)
- SQLite | SQLite Functions | Removing Characters from the Start and End of a String (trim, rtrim, and ltrim Functions)
- SQLite | SQLite Functions | Enclosing a String in Single Quotes (quote Function)
- SQLite | SQLite Functions | Rounding Numbers (round Function)
- SQLite | SQLite Functions | Calculating an Absolute Value (abs Function)
- SQLite | SQLite Functions | Generating Random Numbers (random Function)
- SQLite | SQLite Functions | Converting a BLOB Value to Hexadecimal (hex Function)
- SQLite | SQLite Functions | Generate Random Numbers for BLOB Values (randomblob Function)
- SQLite | SQLite Functions | Create a BLOB 0x00 Value of a Specified Number of Bytes (zeroblob Function)
- SQLite | SQLite Functions | Count Rows Changed by the Most Recent SQL Statement (changes)
- SQLite | SQLite Functions | Count All Rows Changed Since Connecting (total_changes)
- SQLite | SQLite Functions | Returning Another Value for NULL (ifnull and coalesce Functions)
- SQLite | SQLite Functions | Returning NULL When Values Match (nullif Function)
- SQLite | SQLite Functions | Returning the ROWID of the Last Inserted Row (last_insert_rowid Function)
- SQLite | SQLite Functions | Returning the Data Type of a Stored Value (typeof Function)
- SQLite | SQLite Functions | Query SQLite Version Information (sqlite_version Function)