Column name which contains max Value in sql server table.
I have a color table with columns
Code,Red ,Black, Green with values
Cd1,100 ,200,300 .
I want a sql query which will show the column name having highest value.
Expected Output - Green 300


M Rahman26 reputationPosted Apr 15, 2018, 1:40 AM EDT
Nitin SontakkeRank #264 · 9.6K reputationPosted Apr 15, 2018, 2:19 AM EDT
Nitin SontakkeRank #264 · 9.6K reputationPosted Apr 15, 2018, 1:14 AM EDT
Swagat PRank #4,734 · 328 reputationPosted Apr 15, 2018, 8:21 AM EDT