Skip to content

Como Modelar um Banco de Controle de Séries Assistidas com MySQL

License

Notifications You must be signed in to change notification settings

lucasrmagalhaes/movies_controll-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Movies Controll

Movies Controll

Back-end
Front-end

CREATE TABLE movies(
    id INT PRIMARY KEY AUTO_INCREMENT,
    type INT NOT NULL,
    name VARCHAR(30) NOT NULL,
    total_ep INT,
    atual_ep INT,
    last_view DATE DEFAULT CURRENT_TIMESTAMP
)
INSERT INTO 
    movies(`id`, `type`, `name`, `total_ep`, `atual_ep`, `last_view`) 
VALUES 
    (1, 0, 'Friends', 10, 1, current_timestamp())
INSERT INTO 
    movies(id, type, name, total_ep, last_view) 
VALUES 
    (2, 1, 'Avengers', NULL, current_timestamp())
UPDATE 
    `movies` 
SET 
    `last_view` = '2021-11-07' 
WHERE
    `movies`.`id` = 1;
DELETE FROM
    movies 
WHERE 
    id = 2

About

Como Modelar um Banco de Controle de Séries Assistidas com MySQL

Topics

Resources

License

Security policy

Stars

Watchers

Forks