1

New to sql/mariaDB. Looking for the correct syntax when trying to insert a value into a column where another column equals something.

so far this is what i've tried however this doesn't correspond with mariaDB syntax

   INSERT INTO client(payment)
   values
   (50.00)
   where client_info = 5359;

looking to insert the value 50.00 into payment where the column client info equal 5359?

1 Answer 1

2

You are looking for UPDATE clause, as you are not trying to insert a new row, but update the existing row:

UPDATE client
SET payment = 50.00
WHERE client_info = 5359;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.