我想做这样的事情:
CREATE OR ALTER PROC myPROC
@myInput NVARCHAR(MAX)
AS
BEGIN
SELECT *
FROM myTABLE
-- I want this next command to run not to be stored for later execution.
EXEC RegisterProcSomewhere
END
GO
有没有首选方法可以做到这一点?基本上我想在我CREATE/ALTER
时收集我的程序元数据。
答案 0 :(得分:0)
在proc之外调用它以立即执行它。
CREATE OR ALTER PROC myPROC
@myInput NVARCHAR(MAX)
AS
BEGIN
SELECT * FROM myTABLE
-------------------------------
END
GO
--I want this next command to run not to be stored for later execution.
EXEC RegisterProcSomewhere