Updated docs for IF NOT EXISTS contraint
Getty Ritter
8 years ago
59 | 59 | Produces the following SQLite table declarations: |
60 | 60 | |
61 | 61 | ~~~.sql |
62 |
CREATE TABLE |
|
62 | CREATE TABLE IF NOT EXISTS books | |
63 | 63 | ( id INTEGER PRIMARY KEY ASC |
64 | 64 | , title TEXT NOT NULL UNIQUE |
65 | 65 | , pages INT NOT NULL DEFAULT 0 |
67 | 67 | , published DATE NOT NULL |
68 | 68 | , FOREIGN KEY(author_name) REFERENCES authors(id) |
69 | 69 | ); |
70 |
CREATE TABLE |
|
70 | CREATE TABLE IF NOT EXISTS authors | |
71 | 71 | ( id INTEGER PRIMARY KEY ASC |
72 | 72 | , name TEXT NOT NULL |
73 | 73 | , gender BLOB |