Fetch Store Procedure

USE [st_SubiTechnologies]
GO
/****** Object:  StoredProcedure [dbo].[Sp_Register_GetLastCoupon]    Script Date: 2/10/2017 10:56:47 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[Sp_Register_GetLastCoupon]

--@flag int output
AS
BEGIN
begin transaction

select top(1) Coupon from tbl_registration order by rowId desc

--if @@ERROR=0
--begin
-- set @flag=1
-- commit transaction

--end
--else
--begin
-- set @flag=0
-- rollback transaction
--end
END

Popular posts from this blog

How to protect your Drive/Flash USB Drive (Pen Drive) with Password without using any software