is it possible t开发者_如何学JAVAo get table name in a MySQL trigger ? i use trigger to log insert actions on some tables in MySQl and i need the name of the table where the trigger is placed at.
Thanx before :)
I would recommend that you put triggers on all the tables that require logging.
Here is an example:
@tablename = OBJECT_NAME(parent_object_id)
FROM sys.objects
WHERE sys.objects.name = OBJECT_NAME(@@PROCID)**
精彩评论