decomp DBCServer_Release and inspect/document database
This commit is contained in:
parent
4b267cbe05
commit
7834b98bf0
28222 changed files with 843300 additions and 144 deletions
|
|
@ -0,0 +1,43 @@
|
|||
|
||||
CREATE PROCEDURE [dbo].[ClearVerificationCode]
|
||||
@Email varchar(255)
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
|
||||
DECLARE @Result varchar(30)
|
||||
DECLARE @VerificationCodeExists int;
|
||||
|
||||
BEGIN TRY
|
||||
BEGIN TRANSACTION
|
||||
|
||||
SELECT @VerificationCodeExists = COUNT(*) FROM VerificationCode
|
||||
WHERE Email = @Email;
|
||||
|
||||
|
||||
-- Check if VerificationCode exists
|
||||
IF @VerificationCodeExists > 0
|
||||
SET @Result = 'VerificationCodeExists';
|
||||
ELSE
|
||||
SET @Result = 'NoVerificationCode';
|
||||
|
||||
-- DELETE VerificationCodes
|
||||
IF @Result = 'VerificationCodeExists'
|
||||
BEGIN
|
||||
DELETE FROM VerificationCode WHERE Email = @Email;
|
||||
|
||||
SET @Result = 'VerificationCodeClean';
|
||||
|
||||
END;
|
||||
|
||||
COMMIT TRANSACTION;
|
||||
END TRY
|
||||
BEGIN CATCH
|
||||
ROLLBACK TRANSACTION;
|
||||
SET @Result = 'TransactionFailed';
|
||||
END CATCH
|
||||
|
||||
SELECT @Result as Result;
|
||||
|
||||
END
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue