Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6241307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:44:41+00:00 2026-05-24T11:44:41+00:00

I use INFORMATION_SCHEMA.PARAMETERS for getting information about a stored procedure parameter now. I need

  • 0

I use INFORMATION_SCHEMA.PARAMETERS for getting information about a stored procedure parameter now. I need to know the default values of parameters. Is there a solution for getting the default value of the parameters of a given stored procedure?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:44:42+00:00Added an answer on May 24, 2026 at 11:44 am

    Parse the SQL code if you are doing it via SQL commands…

    The information isn’t stored in a system table. From sys.parameters (where you’d expect it), has_default_value and default_value columns, we’re told to parse SQL:

    SQL Server only maintains default values for CLR objects in this catalog view; therefore, this column has a value of 0 for Transact-SQL objects. To view the default value of a parameter in a Transact-SQL object, query the definition column of the sys.sql_modules catalog view, or use the OBJECT_DEFINITION system function.

    If has_default_value is 1, the value of this column is the value of the default for the parameter; otherwise, NULL.

    To prove:

    CREATE PROC dbo.Paramtest (@foo int = 42)
    AS
    SET NOCOUNT ON;
    GO
    
    SELECT OBJECT_NAME(object_id), has_default_value, default_value
    FROM sys.parameters
    WHERE name = '@foo' AND object_id = OBJECT_ID('dbo.Paramtest')
    
    -- gives Paramtest, 0, NULL
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In SQL you can use SELECT * FROM INFORMATION_SCHEMA.TABLES etc to get information about
I need to use VBA to filter some information in excel. As I have
I'm trying to use the following stored procedure. DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `DeleteField`(
I'm trying to create a simple stored procedure which I can use to write
I use the following query to get information about columns of a SQL Table
I am trying to query for a list of stored procedure definitions using information_schema.routines
I'm getting the error when accessing a Stored Procedure in SQL Server Server Error
I'm trying to use a variable as the table name within a stored procedure
I know I can use the following query to find all stored procedures and
I need to get the parameter definitions of a PL/SQL procedure. On MS SQL,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.