Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE PROCEDURE createAccount
- @username char(20),
- @email char(50),
- @password char(20),
- @verified BIT,
- @enabled BIT,
- @verificationCode char(8),
- @class TINYINT,
- @gender char (6)
- AS
- BEGIN TRY
- BEGIN TRANSACTION
- INSERT INTO Accounts ([username], [email], [password], [verified?], [enabled?], [verificationCode])
- VALUES (@username, @email, @password, @verified, @enabled, @verificationCode)
- INSERT INTO Characters([doingSomething?], [class], [gender])
- VALUES (@username, @email, @password, @verified, @enabled, @verificationCode)
- END TRY
- BEGIN CATCH
- IF @@TRANCOUNT>0
- ROLLBACK
- END CATCH
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement