Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否有一种方法可以检测执行触发存储过程的查询的用户的登录名?table_a比如说,当特定列发生更改时,我有一个触发器。我想检索执行触发存储过程运行的查询的登录用户的名称。
table_a
这可能吗?
事实证明,有一个公认的关键字current_user可以做我想要的事情 - 保存执行查询的当前用户的用户名。
current_user