Maak de kolom:
ALTER TABLE yourtable ADD COLUMN combined VARCHAR(50);
Werk de huidige waarden bij:
UPDATE yourtable SET combined = CONCAT(zipcode, ' - ', city, ', ', state);
Werk alle toekomstige waarden automatisch bij:
CREATE TRIGGER insert_trigger
BEFORE INSERT ON yourtable
FOR EACH ROW
SET new.combined = CONCAT(new.zipcode, ' - ', new.city, ', ', new.state);
CREATE TRIGGER update_trigger
BEFORE UPDATE ON yourtable
FOR EACH ROW
SET new.combined = CONCAT(new.zipcode, ' - ', new.city, ', ', new.state);