Stored Procedure Properties
Name | Value |
---|---|
Owner | dbo |
Created | 2004-05-31 |
Startup | False |
Encrypted | False |
Creation Options
Name | Value |
---|---|
QUOTED_IDENTIFIER | OFF |
ANSI_NULLS | OFF |
Parameters
Name | DataType | Length | Type |
---|---|---|---|
@UserName | nvarchar | 100 | INPUT |
@ForumID | int | 4 | INPUT |
@EmailNotification | bit | 1 | INPUT |
Total: 3 parameter(s)
SQL
SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO create procedure forums_AddModeratedForumForUser ( @UserName nvarchar(50), @ForumID int, @EmailNotification bit ) AS -- add a row to the Moderators table -- if the user wants to add All Forums, go ahead and delete all of the other forums IF @ForumID = 0 DELETE FROM Moderators WHERE Username = @UserName -- now insert the new row into the table INSERT INTO Moderators (Username, ForumID, EmailNotification) VALUES (@UserName, @ForumID, @EmailNotification) GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO