I have a database table with a lot of data. There is one attribute that I would like to extract from it. This attribute is commonly the same for each entry. There are about three variations of it. Is it possible to get those three variations in a list without traversing through the entire database.
For example I don't want to do the following for efficiency:
foreach (var x in table)
{
list.Add(x.attribute);
{
I would just like the unique attributes and ignore all redundant ones. I imagine if I just did an if(notSeen()) it would still traverse through the table and not save much work.
Are there any tools to help with this sort of process?