[sql]
-- ===================【創建存儲過程】=====================
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