I have a question about how DROP TRIGGER works.
I used this command to drop triggers:
DROP TRIGGER IF EXISTS `database`.`mytrigger`;
But my qquestion is, u can drop a trigger selecting it with table name? for example:
DROP TRIGGER IF EXISTS `table`.`mytrigger`;
I tried it but the trigger is not deleted when i set tablename.
Thanks!
No, because that doesn't uniquely identify a trigger, and it ends up looking like you're trying to say you have a database called table anyway. If you just want to leave off the database name, you don't need to replace it with anything:
DROP TRIGGER IF EXISTS `mytrigger`;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With