The equivalent of this pseudo-code:
for password in passwd: set password = crypt(password, my encryption method)
update t set password = crypt(password, . . .);
SQL is a set-based language. SQL queries do not have a looping mechanism because the language is operating on entire tables (or filtered subsets thereof).
You can add a
where clause if you want to filter the rows so not all are updated.
CLICK HERE to find out more related problems solutions.