Questions tagged as 'trigger'

1
answer

Delete in an UPDATE trigger

How can I delete a record being inserted into a specific condition in a trigger? example: USE 'scompraslenovo'; DELIMITER $$ CREATE TRIGGER 'precad_fornecedor_BUPD' BEFORE UPDATE ON 'precad_fornecedor' FOR EACH ROW BEGIN IF (new.f1 IS N...
asked by 17.12.2014 / 16:54
1
answer

MYSQL - Error Code: 1451. Can not delete or update a parent row: a foreign key constraint fails

I have to do a trigger, where to be excluded an employee will also be excluded its dependent. But I can not exclude. the code looks like this: delimiter $ create trigger TRG_excluiDependente_AD after delete on Funcionario for each row begin...
asked by 09.12.2018 / 13:36
1
answer

Cursor Trigger in book allocation

Well, I have a table called LOCALAOBOOK in it I have BOOK and CUSTOMER information when an insert or update of allocation occurs, so the customer_id, id_id, the output_data will be informed and from this date the delivery_date_date will be gener...
asked by 29.05.2016 / 20:51
1
answer

Return Java Trigger [closed]

I have a trigger that checks if the login of the user has more than 3 characters and if it does not have it returns msg "login must have more than 3 characters", how can I capture this return in java and show in a Joptionpane? with try catch(...
asked by 12.12.2016 / 17:03
1
answer

Trigger for housing system [closed]

I am developing a property system and I need every five minutes the bank to read the information of the property, process and decrypt the information, send a confirmation of processing and discard the information. I'm thinking of doing some trig...
asked by 30.09.2016 / 15:30