Zkuste: UPDATE announcements a SET announcer = (SELECT memberid FROM users u WHERE u.username = a.announcer)