October 2018
Beginner to intermediate
348 pages
10h
English
Let's write some data to that table. To do this, we'll use the INSERT statement. With an INSERT statement, all PRIMARY KEY components must be specified; we will specify status and order_id. Additionally, every column that you wish to provide a value for must be specified in a parenthesis list, followed by the VALUES in their own parenthesis list:
INSERT INTO order_status (status,order_id,total) VALUES ('PENDING',UUID(),114.22);INSERT INTO order_status (status,order_id,total) VALUES ('PENDING',UUID(),33.12);INSERT INTO order_status (status,order_id,total) VALUES ('PENDING',UUID(),86.63);INSERT INTO order_status (status,order_id,total,shipping_weight_kg) VALUES ('PICKED',UUID(),303.11,2);INSERT INTO order_status (status,order_id,total,shipping_weight_kg) ...