Friday, February 24, 2012

DEFAULT values for Procedure parameters

Hi there,
I was wondering if there's a way to get the default
values for stored procedure parameters.
I've tried both MS SQL 2000 and SQL 2005, but
I cannot figure out a way to do it except for parsing
the source code of the procedure.
Both "sys.parameters" and "syscolumns" have references
to default values, but neither fills them in for TSQL
Stored Procedures.
Anyone has an idea?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.comHi
I have my doubt that you have a direct way to get it out
USE Northwind
GO
SELECT *
FROM information_schema.routines
WHERE ROUTINE_NAME = 'SPname'
"Martijn Tonies" <m.tonies@.upscene.removethis.com> wrote in message
news:%236ALBXaHGHA.2012@.TK2MSFTNGP14.phx.gbl...
> Hi there,
> I was wondering if there's a way to get the default
> values for stored procedure parameters.
> I've tried both MS SQL 2000 and SQL 2005, but
> I cannot figure out a way to do it except for parsing
> the source code of the procedure.
> Both "sys.parameters" and "syscolumns" have references
> to default values, but neither fills them in for TSQL
> Stored Procedures.
> Anyone has an idea?
> --
> Martijn Tonies
> Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
> Server
> Upscene Productions
> http://www.upscene.com
> Database development questions? Check the forum!
> http://www.databasedevelopmentforum.com
>

No comments:

Post a Comment