存储过程的删除 创建 执行

USE master
IF OBJECT_ID ('dbo.pro') IS NOT NULL
DROP PROCEDURE dbo.pro
go     
create proc dbo.pro(
@instance sql_variant output)
as
select @instance = (SELECT SERVERPROPERTY('SERVERNAME'))
go
declare @instance sql_variant
exec dbo.pro @instance output
select @instance

你可能感兴趣的:(存储过程)