4

Is there any Information to get default value of stored procedure Input parameters is SQL Server side?

I can get information about stored procedure input parameters via INFORMATION_SCHEMA.PARAMETERS but this table does not give any info about Default Value of the parameters.

4
  • All input parameters to stored procedures are nullable. Only natively compiled stored procedures (for SQL Server 2014) supports non-nullable parameters. Commented Jun 18, 2015 at 11:22
  • you can define parameters nullable or not. but I want to know if sql server save this info or not. for example you define a parameter like this : @FromaDate char(10) = NULL Commented Jun 18, 2015 at 11:25
  • Perhaps you mean default value for parameters as all of them can be null. Commented Jun 18, 2015 at 11:27
  • Yes! so Is there any Information to get default value of stored procedure Input parameters? I corrected my question. Commented Jun 18, 2015 at 11:29

1 Answer 1

2

The value of each declared parameter must be supplied by the user when the procedure is called, unless a default for the parameter is defined or the value is set to equal another parameter.

And all parameters are null-able as all data-types accept null.
You can don't prompt a parameter by setting a default value to it.

And you can use sys.parameters table for seeing default values.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.