我正在使用输出参数从我的数据库中获取值.
这是我的存储过程:
ALTER PROCEDURE [dbo].[sp_GetCustomerMainData]
-- Add the parameters for the stored procedure here
@Reference nvarchar(100),
@SubscriptionPIN nvarchar(100) OUTPUT,
@SignupDate nvarchar(100) OUTPUT,
@ProductCount int OUTPUT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
SET @SubscriptionPIN = 'N/A'
SET @SignupDate = 'N/A'
SET @ProductCount = 0
-- Insert statements for procedure here
IF EXISTS(SELECT [SubscriptionPIN] FROM [Norton].[dbo].[Customers] WHERE [Reference] = @Reference)
BEGIN
SELECT TOP 1 @SubscriptionPIN = [SubscriptionPIN], …Run Code Online (Sandbox Code Playgroud)