insert into user_roleselect 3, --the userid of the new person who will receive/inherit the roles r.roleid from [role] rwhere r.userid IN(SELECT userid from [user] u WHERE fname = 'john')--he was userid 1 in your example