I want to select all logins, users, and user groups that are shown in the Security > Logins folder in SSMS.
I run this command:
select * from sys.sql_logins
select * from sysusers
The folder in SSMS has 66 items, but the query only returns 14 and 22 rows, even including things not shown in the folder such as db_owner, db_accessadmin, etc.