Questions tagged as 'trigger'

1
answer

Error Trigger AFTER DELETE

I have the following code: create or replace trigger calckmdl after delete on tsegmento for each row declare total rutas.km%type; begin if deleting then select km into total from rutas where ruta=:new.ruta; if :old.unidad = 'km...
asked by 26.06.2018 / 02:30
1
answer

Error in a trigger to erase rows

I have the following trigger: CREATE TRIGGER actualizarConsulta AFTER INSERT ON ranking FOR EACH ROW BEGIN DELETE FROM Consulta C WHERE C.jugador_id = NEW.player_id; END; When I try to execute it I get the following er...
asked by 28.04.2018 / 17:36
1
answer

How to use a variable in the Transact SQL update function within a trigger?

What I want to achieve is to go through each column of a table and check if it has a change with the function update (colum), but apparently it takes the variable where I keep the column as a valid argument. DECLARE @field INT , @maxfie...
asked by 20.03.2018 / 18:07
1
answer

Trigger Sql Sever

I have a database with two tables: Category and Team, the relationship between the tables goes like this: a category can have many teams. I have created a trigger so that at the moment of inserting a team a quantity field of the category table i...
asked by 03.03.2018 / 04:55
1
answer

Triggers PhpMyAdmin

I have the following trigger: CREATE OR REPLACE TRIGGER tr_insercion_evento AFTER INSERT ON evento BEGIN INSERT INTO historico_evento(historico_evento.id, historico_evento.fecha_cambio, historico_evento.evento_id, historico_evento.usuario_exo...
asked by 08.11.2017 / 15:55
2
answers

Trigger in java?

I have a curiosity, could I do some kind of trigger in java? For example, I would like my application to send me an email every week, to say something with all the sales made the previous week, because I could be reviewing the date with a while...
asked by 09.10.2017 / 16:34
1
answer

How to create a Trigger in mysql with WHERE

I have a problem, it turns out that I am learning to create Trigger in mysql but I can not find the way I need it. I have this table, which is filled with records every day with more frequency in the mornings. I need to create a Trig...
asked by 16.08.2017 / 17:46
1
answer

Trigger in MySQL to send messages to the cell phone [closed]

I start with the topic of triggers and I would like to know if it is possible to create one that sends messages to the cell phone. The question has already been answered by @Michel Escalante Álvarez. Thank you very much !!!     
asked by 16.05.2017 / 16:52
2
answers

Bitacora of a database?

I need to create a trigger that registers the insert, update, delete that happen in a certain table. For this, I have the following code in which, within the trigger for insert that I already have defined, I miss an error in saying that the name...
asked by 01.11.2016 / 20:32
0
answers

Trigger for mysql table revision

If I have two tables called person and tax with their columns (id "of type int", name "of type varchar", tax "of type int") and (id "of type int", percentage "of type varchar ", available" of type boolean ") respectively, being the column person...
asked by 29.12.2018 / 14:55