Mysql – Creating a thesql trigger without hard-coding database name

MySQLtrigger

Is there a way to create a trigger in mysql without hardcoding the database name?

Doing a typical create trigger will stop working if I dump the database and then import it into a database of a different name.

Best Answer

I guess I'll guess an answer to my question. A lot of mysql documentation just references a table name without specifying a database, so I am assuming the database is optional and if you don't include it, mysql will use the current one.