How to get list of users and groups which users belong to from DB backend

  • KM03770013
  • 28-Dec-2020
  • 28-Dec-2020

This document has not been formally reviewed for accuracy and is provided "as is" for your convenience.

Summary

For a reason, sometimes we need to get list of users and groups which users belong to from DB backend

Answer

Use this query to get data from DB backend

SELECT US_USERNAME as UserName,

GR_GROUP_NAME as Groups

FROM USERS, GROUPS

WHERE SUBSTRING (US_GROUP, GR_GROUP_ID+1, 1) = '1'

order by US_USERNAME

 

Modification may require based on the DB type (Oracle/MS SQL) is used.