Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Find out the new features and enhancements added into SQL Server 2012, codenamed "Denali"

Moderators

Top Categories · View All
TSQL Enhancements 28
Discontinued Features 16
SSIS Enhancements 10
SSMS Enhancements 10
Database Engine 10
Database Administration 8
Security 3
Full Text Search 2
DataTime 1
Breaking Changes 1

Browse by Tags · View All
Denali 82
SQL Server 2012 79
SSIS 9
SSMS Enhancements 9
Analytic Functions 8
Usability Enhancements 5
SQL11 4
TSQL 4
Security 3
Database Engine 3
Datetime 3
Query Hints 2
OVER Clause 2
DMV 2
Groups 2
Dynamic Management Functions 2
DMF 2
System stored procedures 2
DBA 2
FTS 2

Browse by Release · View All
All 58
RC0 20
SQL Server 2012 Denali 2
CTP3 2
SQL Server Denali 1

What is new in SQL Server 2012 - Denali

SQL Server 2012 Denali - New system stored procedure: sp_describe_undeclared_parameters

Nov 29 2011 5:47AM by Jacob Sebastian   

sp_describe_undeclared_parameters is a new system stored procedure added in SQL Server 2012 (Denali). It returns a result set that contains metadata about undeclared parameters in a Transact-SQL batch.

The following excerpt is taken from MSDN documentation

The most common use is when an application is given a Transact-SQL statement that might contain parameters and must process them in some way. An example is a user interface (such as ODBCTest or RowsetViewer) where the user provides a query with ODBC parameter syntax. The application must dynamically discover the number of parameters and prompt the user for each one.

Another example is when without user input, an application must loop over the parameters and obtain the data for them from some other location (such as a table). In this case, the application does not have to pass all the parameter information at once. Instead, the application can get all the parameters information from the provider and obtain the data itself from the table. Code using sp_describe_undeclared_parameters is more generic and is less likely to require modification if the data structure changes later.structure changes later.

The following example demonstrates how to use this procedure.

-- Build a query string that contains parameters
DECLARE @query NVARCHAR(MAX) = N'
SELECT 
    object_id, name, type_desc 
FROM sys.indexes
WHERE object_id = @id OR name = @name'

-- Retrieve metadata of @id and @name parameters
EXECUTE sp_describe_undeclared_parameters 
    @tsql = @query

Read More Have you written a blog post or article related to this feature and want to get them added here? Read More...
Category : Database Administration
Release : RC0
Tags : SQL Server 2012, Denali, Database Administration, DBA, System stored procedures, Metadata Discovery


Jacob Sebastian
1 · 100% · 32004
4



Submit

Your Comment


Sign Up or Login to post a comment.

"SQL Server 2012 Denali - New system stored procedure: sp_describe_undeclared_parameters" rated 5 out of 5 by 4 readers
SQL Server 2012 Denali - New system stored procedure: sp_describe_undeclared_parameters , 5.0 out of 5 based on 4 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]