Also, you need to have kind of the next query:
UPDATE table_name SET "column1" = $1 WHERE "id" = $2;
Without specifying which record you need to update, you will update all of them.
Link: https://www.tutorialspoint.com/sql/sql-update-query.htm