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.
为什么 USER_NAME(USER_ID()) 返回 dbo 而不是 'sa' 作为当前用户名?
我有一个触发器,应该插入对表进行更改的用户的用户名。
但是,触发器将 dbo 作为用户插入。为什么是这样?
开始使用suser_sname()
suser_sname()
并停止使用sa登录!
sa