24 lines
558 B
MySQL
24 lines
558 B
MySQL
|
use nfp_sites;
|
||
|
go
|
||
|
|
||
|
-- Object_definition(object_id)
|
||
|
|
||
|
Declare @sql varchar(max) ;
|
||
|
SELECT @sql=Object_definition(object_id)
|
||
|
FROM sys.procedures
|
||
|
WHERE name = 'spe_get_my_data' and SCHEMA_NAME(schema_id) = 'dbo';
|
||
|
SET @sql=REPLACE(@sql, 'CREATE PROCEDURE [dbo].', 'ALTER PROCEDURE [nfp_moe].');
|
||
|
print @sql
|
||
|
exec (@sql)
|
||
|
print '-----------------------------';
|
||
|
|
||
|
|
||
|
SELECT *
|
||
|
FROM sys.procedures
|
||
|
WHERE name like 'spe_%' and SCHEMA_NAME(schema_id) = 'dbo';
|
||
|
|
||
|
|
||
|
SELECT *
|
||
|
FROM sys.procedures where SCHEMA_NAME(schema_id) = 'dbo';
|
||
|
|
||
|
EXEC sp_helptext 'dbo.spe_get_schema';
|