Re: Issues with converting update command to trigger
create table telemetry_log(id int,device_id int,device_desc varchar(32) );
create table id_name_device(device_id int,device_desc varchar(32) );
CREATE TRIGGER add_desc BEFORE insert on telemetry_log FOR EACH ROW
set new.device_desc = ( select device_desc from id_name_device where device_id=new.device_id );
Works in MySQL 5.7 and 8.0.
Subject
Views
Written By
Posted
238
July 01, 2020 09:29AM
Re: Issues with converting update command to trigger
64
July 03, 2020 07:17AM
Sorry, only registered users may post in this forum.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.