Update a groupID for several distinct users selected from column of other table
Posted: 2019-03-01 10:19
Hi,
I'd like to do an update of field groupID in table membership_users for selection of users from other table where they are selected by command:
SELECT DISTINCT Schvalovatel1 FROM `role`,
my question is how to write an update command correctly:
UPDATE `membership_users` SET `groupID` = 5 WHERE `custom2` = SELECT DISTINCT Schvalovatel1 FROM `role`
Many thanks in advance.
I'd like to do an update of field groupID in table membership_users for selection of users from other table where they are selected by command:
SELECT DISTINCT Schvalovatel1 FROM `role`,
my question is how to write an update command correctly:
UPDATE `membership_users` SET `groupID` = 5 WHERE `custom2` = SELECT DISTINCT Schvalovatel1 FROM `role`
Many thanks in advance.