Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

create table mysql integer NOT null

CREATE TABLE IF NOT EXISTS checklists (
    todo_id INT AUTO_INCREMENT,
    task_id INT,
    todo VARCHAR(255) NOT NULL,
    is_completed BOOLEAN NOT NULL DEFAULT FALSE,
    PRIMARY KEY (todo_id , task_id),
    FOREIGN KEY (task_id)
        REFERENCES tasks (task_id)
        ON UPDATE RESTRICT ON DELETE CASCADE
);
Code language: SQL (Structured Query Language) (sql)
Source by www.mysqltutorial.org #
 
PREVIOUS NEXT
Tagged: #create #table #mysql #integer #NOT #null
ADD COMMENT
Topic
Name
2+4 =