INSERT IGNORE INTO util.notification ( `name`,`description`) VALUES ( 'zone-included','An email to notify zoneCollisions'); -- Change value if destionation user should be different SET @DESTINATION_USER = "pepe"; SET @MaxId = LAST_INSERT_ID(); INSERT IGNORE INTO util.notificationSubscription (notificationFk,userFk) VALUES( @MaxId, (SELECT id from `account`.`user` where name = @DESTINATION_USER)); INSERT IGNORE INTO util.notificationAcl (notificationFk,roleFk) SELECT @MaxId, (SELECT role from `account`.`user` where name = @DESTINATION_USER) FROM util.notification WHERE name= "zone-included";