Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql check roles

USE master  
GO  
SELECT DP1.name AS DatabaseRoleName,   
   isnull (DP2.name, 'No members') AS DatabaseUserName   
 FROM sys.database_role_members AS DRM  
 RIGHT OUTER JOIN sys.database_principals AS DP1  
   ON DRM.role_principal_id = DP1.principal_id  
 LEFT OUTER JOIN sys.database_principals AS DP2  
   ON DRM.member_principal_id = DP2.principal_id  
WHERE DP1.type = 'R'
ORDER BY DP1.name;
Comment

PREVIOUS NEXT
Code Example
Sql :: sql count duplicate rows 
Sql :: get date from now() mysql 
Sql :: athena query timestamp greater than 
Sql :: postgresql if 0 then 1 
Sql :: how to update an attribute in MySQL 
Sql :: postgresql change column to not null 
Sql :: use cases condition in sql query laravel 
Sql :: psql lst trigger 
Sql :: connect python to mysql 
Sql :: mysql greater thatn a week ago 
Sql :: sql drop multiple columns if exists 
Sql :: SQL Integer devision 
Sql :: reset auto increment sql server 
Sql :: select item.* as json mysql 
Sql :: mysql check if string contains comma separated 
Sql :: create table mysql query 
Sql :: check sql database table lock 
Sql :: oracle aleter trigger ora-01031 
Sql :: foreign key oracle 
Sql :: mysql between start date and end date 
Sql :: mysql column start with string 
Sql :: how to connect mysql with specify port thorugh cmd 
Sql :: get ddl materialized view oracle 
Sql :: sql get guid 
Sql :: insert current timestamp in postgresql 
Sql :: oracle current date plus 1 month 
Sql :: sql update alias 
Sql :: mysql update inner 
Sql :: python mysql search 
Sql :: mysql all columns 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =