sql server数据库查看有多少存储过程procedures
广告:
SELECT COUNT(*) AS 'Number of Stored Procedures'
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = 'PROCEDURE';
SELECT *
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = 'PROCEDURE';
SELECT *
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = 'PROCEDURE' order by created
SELECT *
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = 'PROCEDURE' order by last_altered
二
SELECT
Name,--存储过程名字
Definition --存储过程内容
,created,last_altered
FROM sys.sql_modules AS m
INNER JOIN sys.all_objects AS o ON m.object_id = o.object_id
WHERE o.[type] = 'P'
SELECT
Name,--存储过程名字
Definition --存储过程内容
,create_date,modify_date
FROM sys.sql_modules AS m
INNER JOIN sys.all_objects AS o ON m.object_id = o.object_id
WHERE o.[type] = 'P'
SELECT
Name,--存储过程名字
Definition --存储过程内容
,create_date,modify_date
FROM sys.sql_modules AS m
INNER JOIN sys.all_objects AS o ON m.object_id = o.object_id
WHERE o.[type] = 'P' order by modify_date desc
三
USE [YourDatabaseName];
GO
SELECT COUNT(*) AS NumberOfStoredProcedures
FROM sys.procedures;
SELECT *
FROM sys.procedures;
SELECT *
FROM sys.procedures order by create_date desc;
SELECT *
FROM sys.procedures order by modify_date desc;
广告: