Stored Procedures, functions, and trigger code in SQL Server are stored in SYS. SQL _modules.
Return a line for each module object defined in the SQL language. Objects of the P, RF, V, TR, FN, if, TF, and r types are associated with SQL modules. In this view, the independent default value, that is, the D type object also has the SQL module definition. For more information about these types, seeTypeColumn.
Column name |
Data Type |
Description |
Object_id |
Int |
The ID of the object that contains the object. It is unique in the database. |
Definition |
Nvarchar (max) |
SQL text used to define this module. Null = encrypted. |
Uses_ansi_nulls |
Bit |
The module is created using set ansi_nulls on. For rules and default values, always = 0. |
Uses_quoted_identifier |
Bit |
The module is created using set quoted_identifier on. |
Is_schema_bound |
Bit |
The module is created using the schemabinding option. |
Uses_database_collation |
Bit |
1 = the schema binding module is defined based on the default sorting rules of the required database to be correctly processed; otherwise, the value is 0. This dependency prevents you from changing the default database sorting rules. |
Is_recompiled |
Bit |
The process is created using the with recompile option. |
Null_on_null_input |
Bit |
The module is declared to generate Null Output for null input. |
Execute_as_principal_id |
Int |
The ID of the database entity. It is null by default or if it is execute as caller. If it is execute as self or execute as <subject>, It is the ID of the specified subject. -2 = execute as owner. |