Voici ses principaux champs :
Nom du champ | Type du champ | Description du champ |
is_output | bit | Sorte du paramètre. |
max_length | smallint | Taille du paramètre. |
name | sysname | Nom du paramètre. |
object_id | int | Identifiant de la procédure ou de la fonction stockée. |
parameter_id | int | Numéro du paramètre. |
system_type_id | int | Identifiant du type du paramètre. |
SELECT
e.name,
'',
d.name,
c.name,
a.name,
CASE
WHEN b.name='binary' THEN 1
WHEN b.name='image' THEN 1
WHEN b.name='varbinary' THEN 1
WHEN b.name='char' THEN 2
WHEN b.name='nchar' THEN 2
WHEN b.name='ntext' THEN 2
WHEN b.name='nvarchar' THEN 2
WHEN b.name='text' THEN 2
WHEN b.name='varchar' THEN 2
WHEN b.name='datetime' THEN 3
WHEN b.name='smalldatetime' THEN 3
WHEN b.name='timestamp' THEN 3
WHEN b.name='bigint' THEN 4
WHEN b.name='decimal' THEN 4
WHEN b.name='int' THEN 4
WHEN b.name='money' THEN 4
WHEN b.name='numeric' THEN 4
WHEN b.name='smallint' THEN 4
WHEN b.name='smallmoney' THEN 4
WHEN b.name='tinyint' THEN 4
WHEN b.name='bit' THEN 5
WHEN b.name='float' THEN 6
WHEN b.name='real' THEN 6
ELSE 7
END,
a.max_length,
0,
CASE a.is_output
WHEN 1 THEN 2
ELSE 1
END,
a.parameter_id,
''
FROM sys.parameters a, sys.systypes b, sys.all_objects c, sys.schemas d, sys.sysusers e
WHERE
a.system_type_id=b.xtype
AND c.object_id=a.object_id
AND d.schema_id=c.schema_id
AND e.uid=d.principal_id
AND c.type IN ('P', 'FN', 'TF', 'IF', 'AF', 'FT', 'IS', 'PC', 'FS')
AND e.name LIKE 'MonProprietaire%'
AND d.name LIKE 'MonSchema%'
AND c.name LIKE 'MaProcedure%'
AND a.name LIKE 'MonParametre%'
ORDER BY d.name, c.name, a.parameter_id;