This is an episode of the educational video series 'Projects By Doing' wherein you can learn Data Analysis by following along with an experienced Data Analyst. Expect new episodes every Monday and Thursday!
In this video we show how to insert records into a table. Furthermore, see how to insert one record at a time, and also multiple records with one query.
Please give a thumbs up to this video to encourage us and share this video with your friends and colleagues! Also, subscribe to this channel 'Projects By Doing' and we will update you regularly with our LATEST and GREATEST offerings! Write in a comment of what you liked and how we can improve!
The Queries Run in this session:
use library;
-- First Author
INSERT INTO authors (au_firstname, au_lastname, au_birthdate, au_living)
VALUES ('Daniel', 'Defoe', '1660-08-01', false);
-- Multiple Authors
INSERT INTO authors (au_firstname, au_lastname, au_birthdate, au_living)
VALUES ('Jane', 'Austen', '1775-12-16', false),
('Mary', 'Shelley', '1797-08-30', false),
('Charlotte', 'Bronte', '1816-04-21', false),
('Emily', 'Bronte', '1818-07-30', false),
('Charles', 'Dickens', '1812-02-07', false),
('Lemony', 'Snicket', '1970-02-28', true),
('William', 'Shakespeare', '1564-04-01’, false);
-- Multiple Authors with Default values
INSERT INTO authors (au_firstname, au_lastname, au_birthdate)
VALUES ('James', 'Patterson', '1947-03-22'),
('Lee', 'Child', '1954-10-29');
-- SELECT query
SELECT * FROM authors;