Insertar o actualizar la consulta SQL

INSERT INTO devices(id,name) 
VALUES 
   (4,'Central Printer') 
ON DUPLICATE KEY UPDATE name = 'Central Printer';
anonimus_desu