日期:2014-05-18 浏览次数:20578 次
ALTER PROCEDURE [dbo].[Proc_GetRolePEsRID] ( @RoleId int ) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; select * from (select T2.Id,T2.TypeCode,T2.GroupId,T1.Id as GId,T2.Name+'('+T1.Name+')' as Name from ( select * from [PermissionGroup])as T1,( select * from [Permission]) as T2 where T1.Id = T2.GroupId)as T3 where T3.Id in (select PermissionId from [RolePermission] where not RolePermission.RoleDefId = @RoleId) END