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 many types of index are there?

1046


What do you mean by dbms? What are its different types?

1025


Which is better varchar or nvarchar?

1004


What is normalization in a database?

1168


What are the different ways to optimize a sql query?

953


What are the types of sql commands?

1113


What are the string functions in sql?

987


How do I partition a table in sql?

1142


How do I start sql from command line?

1028


What is cursor in pl sql with examples?

1041


Can a table have no primary key?

1070


Can we rollback truncate?

1007


what are date and time data types? : Sql dba

993


Can I join the same table twice?

1056


GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error?

3059