UPDATE mobile_devices SET name = 'Blackberry', code = 'blackberry' WHERE code = 'nokia_e72';

DELETE FROM mobile_accessories WHERE device_id = (SELECT id FROM mobile_devices WHERE code = 'blackberry');