0

残念ながら、次のように SQL クエリのインライン コメントを使用して監査を行っています。

begin transaction; 
EXEC someStoredProcedure; --this was executed by Bob
commit transaction;

ユーザーが入力したフィールドを持つツールを作成して自動化しようとしています。このように、コメント変数に文字列を作成する方法はありますか?

DECLARE @username varchar(50);

begin transaction; 
EXEC someStoredProcedure; --this was executed by @username
commit transaction;
4

1 に答える 1