SQL select without identical values
Posted on 2015-01-30
I have a table "MyTable" with the fields: MyTable.Id, MyTable.Value, MyTable.Text
How can i make a select which returns me all three fields, but not having the same MyTable.Value ?
"SELECT DISTINCT MyTable.Value FROM MyTable" returns only the column "MyTable.Value"
"SELECT MyTable.Value from MyTable group by MyTable.Value" also returns only the column "MyTable.Value"
But I need the MyTable.Text also in my selection.....
Ps: I have SQL 2008