Insert Data into the orders Table
Learn to insert data into the orders table.
We'll cover the following...
Before we do anything else, let’s see our customers table:
MySQL
select * from customers;
Use of current_timestamp with insert
Now, we’re going to insert a new order in the orders table. We’ll use the following command:
insert into orders (order_number, ordered_at, customer_id) values ('ABC001', current_timestamp, 1);
...