All parameters exist  sys.parameters  In this table , We can copy  sql Get the column information in the table   In this article sql sentence ( Tips : The table we created in the table valued function , Finally, we return to this table , We can use this sql Statement to get the column information returned in the table valued function )

SELECT sp.name ParameterName,
obj.name ObjName,
systype.name ObjType,
sp.is_output IsOutPut,
CAST(sp.max_length AS INT) ByteLength, -- sys.columns Medium max_length Yes bytes
(CASE
WHEN systype.name = 'nvarchar'
AND sp.max_length > 0 THEN
sp.max_length / 2
WHEN systype.name = 'nchar'
AND sp.max_length > 0 THEN
sp.max_length / 2
WHEN systype.name = 'ntext'
AND sp.max_length > 0 THEN
sp.max_length / 2
ELSE
sp.max_length
END
) CharLength,
CAST(sp.precision AS INT) Precision,
CAST(sp.scale AS INT) Scale,
sep.value Remark
FROM sys.parameters sp
LEFT JOIN sys.objects obj
ON sp.object_id = obj.object_id
AND obj.type IN ( 'FN', 'P', 'TF' ) --FN: Scalar ,TF: Table value ,P: stored procedure
INNER JOIN sys.types systype
ON sp.system_type_id = systype.system_type_id
AND systype.user_type_id = sp.user_type_id
LEFT JOIN sys.extended_properties sep
ON sep.major_id = sp.object_id -- It's got this table
AND sp.parameter_id = sep.minor_id -- This column
WHERE sp.parameter_id != 0;

result :

sql server Get stored procedure , Table value , Scalar function parameters of more related articles

  1. SQL Server How to locate a custom scalar function by that SQL The number of calls is the most

    I met a very difficult problem a while ago , The monitoring system DPA It is found that a custom scalar function is called very often , It's so high that it's outrageous . And then in Troubleshooting When it comes to this question , I did encounter some problems, which made me very tangled , Here's the solution ...

  2. SQL SERVER User defined scalar functions in (scalar user defined function) Performance problems of

    User defined function (UDF) classification   SQL SERVER User defined functions in (User Defined Functions abbreviation UDF) Divided into scalar functions (Scalar-Valued Function) And table valued functions (T ...

  3. Sql Server Get a stored procedure or function creation statement

    Through this statement, we can get sqlserver All function names or stored procedure names SELECT name FROM sysobjects WHERE xtype='P'; Through this statement, you can query the function or the stored creation language ...

  4. 【 turn 】SQL SERVER Get the return value of the stored procedure

    1.OUPUT Parameter return value CREATE PROCEDURE [dbo].[nb_order_insert]( @o_buyerid int , @o_id bigint OUTPUT ) AS BEG ...

  5. SQL Server utilize RowNumber() Built in functions and Over Keyword to implement general paging stored procedure ( Support single table or multi table query set paging )

    SQL Server utilize RowNumber() Built in functions and Over Keyword to implement general paging stored procedure , Support single table or multi table query set paging , The stored procedure is as follows : /******************/ --Author: Dream in travel ...

  6. SQL Server Medium CLR Programming —— use .NET by SQL Server Write stored procedures and functions

    original text :SQL Server Medium CLR Programming -- use .NET by SQL Server Write stored procedures and functions I knew for a long time that it could be used .NET by SQL Server2005 And above, write stored procedures . Triggers and stored procedures , But ...

  7. see SQL SERVER Encrypt stored procedures , function , trigger , View

    original text : see SQL SERVER Encrypt stored procedures , function , trigger , View create  PROCEDURE sp_decrypt(@objectname varchar(50))ASbeginset noc ...

  8. SQL Server Get the next coded character to continue reconstruction and enhancement

        I am here SQL Server Get the next coded character realization in blog post , Although this problem has been realized , But I think it's troublesome to maintain it , For example, if you adjust the fixed length of the encoding string , You need to change three functions , Why is the cost really high . Object oriented programming ...

  9. sql server A complete collection of system stored procedures

    key word :sql server System stored procedure ,mssql System stored procedure xp_cmdshell --* perform DOS Various orders , The results are returned as lines of text . xp_fixeddrives --* Query the disks / Partition free space x ...

Random recommendation

  1. JS Pre explanation related understanding

    1.JS There are two types of memory space in : Stack memory . Heap memory Stack memory : Provide JS Code execution environment ; Store values for basic data types ; -> Global scope or private scope is stack memory Heap memory : Store values of reference data types ( Object is the property name and ...

  2. supervisor program Configure the instance

    program To configure We've put supervisrod It's working , Now you can add the profile of the process we want to manage . You can write all configuration items to supervisord.conf In the document , But this is not recommended , and ...

  3. oracle Use dbms_metadata Package gets all objects DDL sentence

    When we want to look at a table or table space DDL When , You can use dbms_metadata.get_ddl This bag to see . dbms_metadata In bag get_ddl Function parameters GET_DDL Function returns to create ...

  4. NSURLConnection、NSURLSession Add

    One . Big file download 1. programme : utilize NSURLConnection And its proxy method 1> Send a request // 1.URL NSURL *url = [NSURL URLWithString:@"h ...

  5. poj 2104 Divide trees

    Ideas : Naked partition trees #include<iostream> #include<algorithm> #include<cstring> #include<cstd ...

  6. OpenSSH ‘mm_newkeys_from_blob’ Function permission and access control vulnerabilities

    Vulnerability name : OpenSSH ‘mm_newkeys_from_blob’ Function permission and access control vulnerabilities CNNVD Number : CNNVD-201311-117 Release time : 2013-11-12 Update time : 2 ...

  7. mysqldump Use of commands

    1. Export structure does not export data mysqldump -d databasename -uroot -p > xxx.sql 2. Exporting data does not export structure mysqldump -t databasename - ...

  8. DFS - leetcode [ Depth-first traversal ]

    Shortest path =>BFS     All paths =>DFS 126. Word Ladder II BFS+DFS: BFS Find the next one that works word Enter the team And record step Update two variables :unordered ...

  9. STM32 drive 1602 liquid crystal

    utilize STM32f103c8t6 Single chip drive 1602A LCD display function The picture above is the effect picture after the information is written I use STM32 The core system of , No peripherals Library function :3.5 Version of the library function Drive mode : use 4 Line driven mode Power supply ...

  10. javascript Medium Date Objects and Math object

    1.Date object 1. establish Date object var time1=new Date() Method 1: Do not specify parameters var time1=new Date(); alert(time1.toLocaleString( ...