How to add value on previous row
INSERT INTO customers (first_name, last_name, email_address, number_of_complaints)
VALUES ('John', 'MacKinley', 'john.mackinley@365datascience.com', 0);
ALTER TABLE customers
CHANGE number_of_complaints number_of_complaints INT DEFAULT 0;
INSERT INTO customers (first_name, last_name, gender)
VALUES ('Peter', 'Figaro', 'M');
So I wrote the values on the first row, but I forgot to add 'M' on the GENDER column for John MacKinley. How to add it back?
Hi Gilliane!
Thanks for reaching out.
You can simply delete this record and add it again with the new values.
Hope this helps.
Best,
Tsvetelin
you can also use update clause
(update customers
set email_adress = 'peter.figaro@gmail.com'
where customer_id = 2)
I think this will work
in your case it will be
update customers
set gender = 'M'
where customer_id = 1;