Can I pass a parameter to run in a SQL Server database?

A table may have a trigger when inserting / deleting / updating. The trigger will be launched internally using the database engine.

Can I pass a parameter to run in a SQL Server database, for example, a stored procedure?

+5
source share
3 answers

Indirectly through CONTEXT_INFO(). See Using session context information . The fact that your trigger requires an extra state is always the smell of code.

+10
source

. , , , . .

, :

  • . , .
  • , , . , , .
0

All Articles