I need to update the column of some specific tables in my SQL database.
I've got a SELECT command, which selects ALL the right tables but i have no idea how i should combine that with UPDATE (I'm a complete noob).
SELECT
c.id_customer AS id_customer,
id_gender,
firstname,
lastname,
c.email AS email,
birthday,
date_add,
c.active AS active,
c.*,
a.id_group
FROM prstshp_customer_group a
LEFT JOIN prstshp_customer c
ON (a.id_customer = c.id_customer)
WHERE 1
AND a.id_group = 4
AND c.deleted != 1
AND c.id_shop IN (1)
ORDER BY id_group ASC
I have to update the column called id_default_group in table prstshp_customer with the value "4", of specific entries, selected across the table prstshp_customer_group table.