What is a SQL Server module?

前端 未结 4 1247
日久生厌
日久生厌 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:48

    I came across to this question when I wanted to get detailed explanation of EXECUTE command. I wanted to have deep understanding how to read t-sql help of command and realized that I haven't known what module means.

    I just want to add these these to the list of sql modules:

    • system stored procedure,
    • user-defined stored procedure,
    • CLR stored procedure,
    • scalar-valued user-defined function,
    • or extended stored procedure.

    Executes a command string or character string within a Transact-SQL batch, or one of the following modules: system stored procedure, user-defined stored procedure, CLR stored procedure, scalar-valued user-defined function, or extended stored procedure. The EXECUTE statement can be used to send pass-through commands to linked servers. Additionally, the context in which a string or command is executed can be explicitly set. Metadata for the result set can be defined by using the WITH RESULT SETS options.

    https://docs.microsoft.com/en-us/sql/t-sql/language-elements/execute-transact-sql?view=sql-server-2017

提交回复
热议问题