I added a new supervisor_id column to the USERS table, which I need to populate from the same USERS table:
ID | USERNAME | SUPERVISOR_USERNAME | SUPERVISOR_ID 1 | jdoe | jsmith | NULL 2 | jsmith | dduck | NULL
How would I scroll the table to set supervisor_id = id, for example:
ID | USERNAME | SUPERVISOR_USERNAME | SUPERVISOR_ID 1 | jdoe | jsmith | 2 2 | jsmith | dduck | NULL
I tried the following, but it obviously only installs a supervisor, where the supervisor_username user is his own username.
update users set supervisor_id = id where supervisor_username = username
source share