Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

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

INSERT INTO suppliers (supplier_name, group_id)
VALUES('XYZ Corp', 1);

INSERT INTO suppliers (supplier_name, group_id)
VALUES('ABC Corp', 2);
Code language: SQL (Structured Query Language) (sql)
Comment

PREVIOUS NEXT
Code Example
Sql :: azure sql-datenbank 
Sql :: SQL Copy Table Schema Only 
Sql :: rollback to in sql 
Sql :: postgresql exploit 
Sql :: crear usuario oracle 
Sql :: db visualizer mssql 
Sql :: python mysql github 
Sql :: postgresql inline table 
Sql :: update having mysql 
Sql :: mysql primary vs unique 
Sql :: join 
Sql :: Object Information 
Sql :: show * from table mysql 
Sql :: Use Join On DataTables | Join Two Tables With ssp.class.php (Select & Search) 
Sql :: reset increment sqk 
Sql :: sqlite ignore index 
Sql :: multiple value select mysql 
Sql :: how to enter psql shell 
Sql :: mysql on delete set null 
Sql :: practice sql queries 
Sql :: mysql order by desc 
Sql :: multiple values insert in sql 
Sql :: create database in sql 
Sql :: xamarin sql lite create table if not exist 
Csharp :: how ot make a variable public without showing in the inspector 
Csharp :: unity how to change max fps 
Csharp :: c# get user directory 
Csharp :: how to index ireadonlycollection c# 
Csharp :: c# main file 
Csharp :: c# random enum 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =