Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

create more than 1 tables with references to each other in sqlite3

DROP TABLE suppliers;

CREATE TABLE suppliers (
    supplier_id   INTEGER PRIMARY KEY,
    supplier_name TEXT    NOT NULL,
    group_id      INTEGER NOT NULL,
    FOREIGN KEY (group_id)
       REFERENCES supplier_groups (group_id) 
);
Code language: SQL (Structured Query Language) (sql)
Source by www.sqlitetutorial.net #
 
PREVIOUS NEXT
Tagged: #create #tables #references
ADD COMMENT
Topic
Name
3+4 =