WITH updated_ram AS (
SELECT `Unnamed: 0`, REPLACE(Ram, 'GB', '') AS new_Ram
FROM laptop_backup
)
UPDATE laptop_backup l1
JOIN updated_ram t
ON l1.`Unnamed: 0` = t.`Unnamed: 0`
SET l1.Ram = t.new_Ram;
ALTER TABLE laptop_backup MODIFY COLUMN Ram INTEGER;