-- ===================【创建存储过程】=====================
USE [Message]
GO
/****** Object: StoredProcedure [dbo].[读取外部数据库查询] Script Date: 10/24/2012 05:39:16 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- ============================================= \\ Working没有变1,错误码没有测试,计划时间测试,企业名称
CREATE PROCEDURE [dbo].[数据库查询]
@SmsContent VARCHAR(20)='1231', -- 输入参数
@bj1 INT OUT -- 输入出参数
AS
BEGIN
SELECT @bj1=COUNT(Id) FROM sss
END
-- ===============【调用】==================
USE [Message]
DECLARE @return_value INT
EXEC [dbo].[数据库查询] '1231',@return_value output
SELECT @return_value
//SQL/5542