May 2019
Intermediate to advanced
542 pages
13h 37m
English
Once tables are created, we can add new rows of data using an INSERT statement using this syntax:
INSERT INTO table_name(column1, column2, ...) VALUES (value1, value2, ...), (value3, value4, ...);
For example, let's insert some rows into roasts :
INSERT INTO roasts(description, color) VALUES ('Light', '#FFD99B'), ('Medium', '#947E5A'), ('Dark', '#473C2B'), ('Burnt to a Crisp', '#000000');
In this example, we're providing a description and color value for each new record in the roasts table. The VALUES clause contains a list of tuples, each of which represents a row of data. The number and data types of the values in these tuples must match the number and data types of the columns specified.
Note that we didn't ...
Read now
Unlock full access