spDelete_NetGroup
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@PKID | int | IN | |
@CurrentUsersID | int | IN |
Definition
Copy
CREATE PROCEDURE [dbo].[spDelete_NetGroup]
(
@PKID int,
@CurrentUsersID int
)
AS
BEGIN
--- 1 is the special reserved NetAccountID for the DeletedUser
--Update messages sent to but owned by the other guy
UPDATE [Message] SET RecipientID = 1, RecipientGroupID = Null WHERE RecipientGroupID = @PKID
DELETE FROM [VanityURL] WHERE RealmID=@PKID And RealmTypeID=6
--- NetGroupRelation is deleted through cascade
DELETE FROM [NetGroup] WHERE ID = @PKID
END