I have Users Table which contains many fields including departmentid. departmentid is just a string . Each departmentid can have different users.Is it possible to find all departmentid from Users table without repetation.
I tried to find all departmentid from users table ,but the result contains duplication of departmentid.How to solve this .
Thanks in advance…
SQL
Ruby code
also in rails 3