June 6, 2012

sp_procedures_rowset2 (Transact-SQL MetaData) Definition

Please note: that the following source code is provided and copyrighted by Microsoft and is for educational purpose only.
The meta data is from an SQL 2012 Server.

I have posted alot more, find the whole list here.

Goto Definition or MetaData

Definition:

sys.sp_procedures_rowset2(nvarchar @procedure_schema)

MetaData:

   
create procedure sys.sp_procedures_rowset2
(
@procedure_schema sysname = null
)
as
select
PROCEDURE_CATALOG = db_name(),
PROCEDURE_SCHEMA = schema_name(pro.schema_id),
PROCEDURE_NAME = convert(nvarchar(134),pro.name +';'+ ltrim(str(pro.procedure_number,5))),
PROCEDURE_TYPE = convert(smallint, 3), -- DB_PT_FUNCTION
PROCEDURE_DEFINITION = convert(nvarchar(1),null),
DESCRIPTION = convert(nvarchar(1),null),
DATE_CREATED = pro.create_date,
DATE_MODIFIED = convert(datetime,null)
from
sys.spt_all_procedures pro
where
(@procedure_schema is null or schema_id(@procedure_schema) = pro.schema_id)
order by 2, 3

No comments:

Post a Comment

Total Pageviews