📜  在 sqlite3 中创建多个相互引用的表 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:12.499000             🧑  作者: Mango

代码示例2
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)