Saturday, February 25, 2012

Defaults for Functions and Parameters

I need to be able to get the defaults specified for SQL functions and procedure using sql. I see in the SQL Server 2005 docuementation that for CLR Functions, the defaults used in the create are store in sys.parameters. I need to find out what the defaults are for SQL functions and procedures. I know they are store in the definition of the function (or Procedure), but I want to avoid parsing the text. Thank you.

CREATE FUNCTION [dbo].[myfunc] (@.first int = 1001)

RETURNS int

AS

BEGIN.......

There is no way to get the defaults for TSQL SPs/UDFs without parsing the definition.

No comments:

Post a Comment