Created
November 19, 2018 13:08
-
-
Save par38/803a40524a5dc5799a282f341acb8dd0 to your computer and use it in GitHub Desktop.
SQL 2 - Insert rows in DB - phpMyAdmin - sqlquest - movies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// insert a film without to call the columns | |
INSERT INTO movie | |
VALUES ( | |
null, | |
'Harry Potter and the Philosopher Stone', | |
'http://fr.web.img6.acsta.net/r_1280_720/pictures/14/04/30/11/55/592219.jpg', | |
'Orphelin, Harry Potter a été recueilli à contrecœur par son oncle Vernon et sa tante Pétunia, aussi cruels que mesquins, qui n\'hésitent pas à le faire dormir dans le placard sous l\'escalier.' ); | |
// insert a film, with columns | |
INSERT INTO movie | |
(name, poster, comment) | |
VALUES ( | |
'HarryPotter and the chamber of secrets' , | |
'https://upload.wikimedia.org/wikipedia/en/thumb/c/c0/Harry_Potter_and_the_Chamber_of_Secrets_movie.jpg/330px-Harry_Potter_and_the_Chamber_of_Secrets_movie.jpg', | |
'Harry Potter and the Chamber of Secrets is a 2002 fantasy film directed by Chris Columbus and distributed by Warner Bros. Pictures'); | |
// insert 3 movies, with columns | |
INSERT INTO movie | |
(name, poster, comment) | |
VALUES | |
('Harry Potter and the Prisoner of Azkaban', | |
'https://upload.wikimedia.org/wikipedia/en/thumb/b/bc/Prisoner_of_azkaban_UK_poster.jpg/330px-Prisoner_of_azkaban_UK_poster.jpg', | |
'Harry Potter has been spending another dissatisfying summer with The Dursleys. When Harry\'s Aunt Marge insults his parents, he loses his temper and silently wills her to bloat up and float away.'), | |
('Harry Potter and the Goblet of Fire', | |
'https://upload.wikimedia.org/wikipedia/en/thumb/c/c0/Harry_Potter_and_the_Chamber_of_Secrets_movie.jpg/330px-Harry_Potter_and_the_Chamber_of_Secrets_movie.jpg', | |
'Harry Potter awakens from a nightmare wherein a man named Frank Bryce is killed after overhearing Lord Voldemort conspiring with Peter Pettigrew and another man.'), | |
('Harry Potter and the Order of the Phoenix', | |
'https://upload.wikimedia.org/wikipedia/en/thumb/e/e7/Harry_Potter_and_the_Order_of_the_Phoenix_poster.jpg/220px-Harry_Potter_and_the_Order_of_the_Phoenix_poster.jpg', | |
'During another summer with his Aunt Petunia and Uncle Vernon, Harry Potter is expelled from Hogwarts after using magic to save himself and Dudley Dursley from hooded creatures called Dementors.'); | |
// insert only the name's column | |
INSERT INTO movie (name) VALUES ('Harry Potter and the Half-Blood Prince'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment