Is there a way to programmatically get the current table's name inside a trigger's body? I mean the table the trigger is defined for.
I'm looking for a way to do it in SQL but a workaround in Java would be fine too.
There is no SQL function that returns the name of the table during the execution of a TRIGGER. It is easy to define a SQL constant with the table name inside the trigger's SQL code. With triggers defined in the Java language, the fire() method is called by the system. This method has a parameter for the table name which can be accessed in the Java trigger code. http://hsqldb.org/doc/guide/triggers-chapt.html#trc_trigger_action_java