Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
swdev:sqlite:start [2018/03/13 07:21] smayr [Create Database] |
swdev:sqlite:start [2018/07/18 14:07] (current) smayr [References] |
||
---|---|---|---|
Line 1: | Line 1: | ||
= SQLite = | = SQLite = | ||
+ | == Download == | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | |||
== Create Database == | == Create Database == | ||
- | Create a database schema using a file: < | + | Method 1: Create a database schema using a file: |
+ | < | ||
- | Or create | + | Method 2: Create |
+ | < | ||
$ sqlite3 mydatabase.db | $ sqlite3 mydatabase.db | ||
sqlite> create table greetings(one varchar(10), | sqlite> create table greetings(one varchar(10), | ||
Line 11: | Line 18: | ||
sqlite> select * from greeting; | sqlite> select * from greeting; | ||
</ | </ | ||
+ | |||
+ | <code bash> | ||
+ | $ sqlite3 mydatabase.db | ||
+ | sqlite> CREATE TABLE product ( | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | sqlite> | ||
+ | </ | ||
+ | |||
+ | Method 3: Create table by importing CSV file: | ||
+ | <code bash> | ||
+ | $ sqlite3 mydatabase.db | ||
+ | sqlite> .mode csv | ||
+ | sqlite> .import C:/ | ||
+ | </ | ||
+ | |||
+ | == Alter Table == | ||
+ | <code bash> | ||
+ | ALTER TABLE table_name | ||
+ | ADD new_column_name column_definition; | ||
+ | </ | ||
+ | |||
+ | == SQLite Client == | ||
+ | * [[swdev: | ||
== References == | == References == | ||
* CLI: [[http:// | * CLI: [[http:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// |