What is a SQL Server module?

前端 未结 4 1246
日久生厌
日久生厌 2021-01-19 01:54

I just came across the system view sys.sql_modules today. What is a module versus a DB object? The view returns, most prominently, a column containing the def

4条回答
  •  花落未央
    2021-01-19 02:39

    It's the blocks of T-SQL statements that make up a stored procedure, a stored function, a trigger or a view definition.

    From "Books Online" in the "CREATE PROCEDURE" section:

    Getting Information About Stored Procedures To display the definition of a Transact-SQL stored procedure, use the sys.sql_modules catalog view in the database in which the procedure exists.

    In sys.sql_modules, you'll find the actual T-SQL code.

    Marc

提交回复
热议问题