You need to sign in to do that
Don't have an account?
Query to get all Role which don't have any users assocated with
Hi,
I need to get all Role Name which don't have any users assosciated with it.
SOQL like this:
Select u.Name, (Select Id From Users) from UserRole u where Id !=null
This is not working. Can any one tell me correct soql for this.
Thanks
select id, name from UserRole where id not in (select UserRoleId from user)
All Answers
select id, name from UserRole where id not in (select UserRoleId from user)