Stored Procedure Properties
Name | Value |
---|---|
Owner | dbo |
Created | 2004-05-31 |
Startup | False |
Encrypted | False |
Creation Options
Name | Value |
---|---|
QUOTED_IDENTIFIER | ON |
ANSI_NULLS | ON |
Parameters
Name | DataType | Length | Type |
---|---|---|---|
@UserName | nvarchar | 100 | INPUT |
@Rolename | nvarchar | 512 | INPUT |
Total: 2 parameter(s)
SQL
SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO create procedure forums_AddUserToRole ( @UserName nvarchar(50), @Rolename nvarchar(256) ) AS IF NOT EXISTS (SELECT Username FROM UsersInRoles WHERE Username = @UserName AND Rolename = @Rolename) INSERT INTO UsersInRoles VALUES (@UserName, @Rolename) GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO