Parameterliste von verschiedenen Objekttypen

SELECT	DB_NAME() AS [DatenbankName]
	,SCHEMA_NAME(so.schema_id) AS [Schema]
	, so.name AS [ObjektName]
	, so.type_desc AS [ObjektTyp]
	, sp.parameter_id AS [ParameterID]
	, sp.name AS [ParameterName]
	, TYPE_NAME(sp.user_type_id) AS [ParameterDatenTyp]
	, sp.max_length AS [ParameterMaxBytes]
	, CONVERT(NVARCHAR(10)
	, CASE
		WHEN sp.parameter_id = 0 THEN 'AUS'
		WHEN sp.is_output = 1 THEN 'EINAUS'
	  ELSE 'EIN' END) AS [ParameterMode]
	, CONVERT(NVARCHAR(10)
	, CASE 
		WHEN sp.parameter_id = 0 THEN 'JA' ELSE 'NEIN' END) AS [IstErgebnis]
FROM	sys.objects AS so INNER JOIN
		sys.parameters AS sp ON so.object_id = sp.object_id
ORDER BY [Schema], [ObjektName], [ParameterID]
Noch kein Feedback
Einen Kommentar hinterlassen

You must be logged in to leave a comment. Log in now!

If you have no account yet, you can register now...
(It only takes a few seconds!)