Stored Procedure Icon dbo.forums_DeleteRole

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
@RoleName nvarchar 512 INPUT

Total: 1 parameter(s)

SQL

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO



CREATE PROCEDURE forums_DeleteRole
(
    @RoleName nvarchar(256)
)
AS
    IF EXISTS(SELECT Rolename FROM UserRoles (nolock) WHERE Rolename = @RoleName)
        BEGIN
            DELETE FROM PrivateForums Where Rolename=@Rolename
            DELETE FROM UsersInRoles WHERE Rolename=@Rolename
            DELETE FROM UserRoles WHERE Rolename=@Rolename
        END


GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO


					

Generated on 26/08/2004 15:05:26 by DataAide.