Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can u find column name from a table which have max value
in a row.( not max value)

Answer Posted / mahalakshmi s

select case when col1>col2 then 'col1' else 'col2' end, greatest(col1,col2) end from table_name;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get each name only once from an employee table?

1161


What are types of joins?

1030


What are the qualities of 2nf?

1097


Why do we need databases?

1093


Is it possible to include an insert statement on the same table to which the trigger is assigned?

1065


How can we optimize a sql query?

1110


How do I make my sql query run faster?

1018


What is PL/SQL Records?

1257


What is bind reference and how can it be created?

1070


What is the use of partition by in sql?

1047


What is cursor status?

1239


What are the different types of database management systems?

1038


What is type and rowtype in pl sql?

1058


What is a column in a table?

1189


What are triggers and its uses?

1096