-- 定義三個參數(shù)變量,注意第三個,特別標記是用于輸出 @au_lname varchar (20), @intID int, @intIDOut int OUTPUT
AS
SELECT @intIDOut = @intID + 1
SELECT * FROM authors WHERE au_lname LIKE @au_lname + '%'
--直接返回一個值 RETURN @intID + 2
調用該存儲過程的asp程序如下:
%@ Language=VBScript %> % Dim CmdSP Dim adoRS Dim adCmdSPStoredProc Dim adParamReturnValue Dim adParaminput Dim adParamOutput Dim adInteger Dim iVal Dim oVal Dim adoField Dim adVarChar