Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
so I am a newbie to MySQL and self-learner so take it easy with me.
I have tried to this by doing the following code and it actually worked but did not!.

so I am supposed to do a trigger_check table that has the attribute trigger_status. and then create a trigger after delete that well be stored in the table trigger_check.

What I have tried:

I did this following code.

SQL
 DELIMITER ;
mysql> DELIMITER $$
mysql> CREATE TRIGGER  account_delete 
    ->     AFTER DELETE 
    -> ON account
    ->     FOR EACH ROW 
    -> BEGIN
    ->     INSERT INTO trigger_check(trigger_status)values(trigger_status);
    ->      
    -> END$$
     DELIMITER ;


this was shown which was good after a million tries.

SQL
Query OK, 0 rows affected (0.00 sec)

so I deleted the something from the table account to test my trigger_check table
and it was an empty set.

where it is supposed to have some value in it.

please help and thank you.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900