ALTER TABLE `#__testquestions_results` ADD COLUMN `points_total` int unsigned NOT NULL DEFAULT 0 AFTER `percentage`; UPDATE `#__testquestions_results` SET `points_total` = `total_count` WHERE `points_total` = 0;