Sfida: Inserimento di Dati in Blocco
Invece di inserire i libri uno per uno, puoi rendere il processo più veloce aggiungendo più record in un'unica istruzione INSERT
. Questo è particolarmente utile quando si popola un grande database.
Swipe to start coding
Il tuo compito è inserire i dati forniti nella tabella utilizzando un'unica istruzione INSERT
. Invece di scrivere manualmente i valori, puoi copiare i dati dal frammento qui sotto:
-
('The Old Man and the Sea', 'Ernest Hemingway', 'Fiction', 1952, '9780684801223', 'Charles Scribner''s Sons', 127, 'English', TRUE)
-
('Frankenstein', 'Mary Shelley', 'Horror', 1818, '9780486282114', 'Lackington, Hughes & Co.', 280, 'English', TRUE)
-
('Les Misérables', 'Victor Hugo', 'Historical Fiction', 1862, '9780451419439', 'A. Lacroix, Verboeckhoven', 1488, 'English', TRUE)
-
('Brave New World', 'Aldous Huxley', 'Dystopian', 1932, '9780060850524', 'Chatto & Windus', 268, 'English', TRUE)
-
('The Adventures of Sherlock Holmes', 'Arthur Conan Doyle', 'Mystery', 1892, '9780141034323', 'George Newnes', 307, 'English', TRUE)
Nota
Inserisci i dati nell'ordine dato!
Soluzione
Grazie per i tuoi commenti!