How to add value on previous row
INSERT INTO customers (first_name, last_name, email_address, number_of_complaints)
VALUES ('John', 'MacKinley', 'firstname.lastname@example.org', 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?
Thanks for reaching out.
You can simply delete this record and add it again with the new values.
Hope this helps.
you can also use update clause
set email_adress = 'email@example.com'
where customer_id = 2)
I think this will work
in your case it will be
set gender = 'M'
where customer_id = 1;