ALTER TABLE sitesADD COLUMN url VARCHAR(255) DEFAULT NULL AFTER name; UPDATE sitesJOIN roles ON sites.id = roles.site_idJOIN users ON users.id = roles.user_idSET sites.url = users.url;