Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sqlite create tables

// To create tables in SQLite 
CREATE TABLE "invoice"
(
    id               INTEGER PRIMARY KEY,
    shipping_address TEXT    NOT NULL,
    total_cost       INTEGER NOT NULL
);

CREATE TABLE "order"
(
    id           INTEGER PRIMARY KEY,
    invoice_id   INTEGER NOT NULL,
    product_name TEXT    NOT NULL,
    FOREIGN KEY (invoice_id) REFERENCES invoice (id)
);
Source by www.sqlitetutorial.net #
 
PREVIOUS NEXT
Tagged: #sqlite #create #tables
ADD COMMENT
Topic
Name
5+1 =