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 do I run pl sql in sql developer?

1120


How can you fetch first 5 characters of the string?

1018


tell me about various levels of constraint. : Sql dba

1035


How do you explain an index number?

1110


what is the difference between cluster and non cluster index? : Sql dba

1027


Is primary key clustered index?

950


How do I upgrade sql?

1002


Why do we use partitions in sql?

1050


what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba

1072


How to order siblings in oracle hierarchy queries?

1047


how to create a table index in mysql? : Sql dba

1061


What is %s in sql?

1026


what is meant by nl2br()? : Sql dba

1046


What is meaning of <> in sql?

1070


What is rank dense_rank and partition in sql?

1042