DEFINITIONS

Definitions More Info.
Definition ID165
TitleSQL
CategoryMS_SCRIPT
DefinitionProgrammabilityObjectsAndTheirParameters
Definition Description/* For a simple documentation this Transact-SQL script lists all programmability objects like stored procedures and functions with their input and output parameter including the data types Works with SQL Server 2005 and higher versions in all editions. Requires VIEW META DATA permissions. */ -- Programmability Objects and their Parameters SELECT SCH.name + '.' + OBJ.name AS ObjectName ,CASE WHEN PARA.is_output = 1 THEN N'' ELSE PARA.name END AS ParameterName ,TYP.name AS DataType ,PARA.max_length AS MaxLength ,PARA.precision AS [Precision] ,PARA.scale AS Scale ,PARA.has_default_value AS HasDefault ,ISNULL(CONVERT(varchar(30), PARA.default_value), '') AS DefaultValue FROM sys.parameters AS PARA INNER JOIN sys.objects AS OBJ ON PARA.object_id = OBJ.object_id INNER JOIN sys.schemas AS SCH ON OBJ.schema_id = SCH.schema_id INNER JOIN sys.types AS TYP ON PARA.system_type_id = TYP.system_type_id AND PARA.user_type_id = TYP.user_type_id ORDER BY ObjectName ,PARA.is_output ,PARA.parameter_id;
RecordBycunay
Record Date21-02-2012 14:09:58
Düzenle
Kopyala
Sil