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

What is the basic form of sql query?

922


what are the t string functions available in tsql? : Transact sql

988


What are % type and % rowtype?

1020


What is on delete restrict?

985


What is delete command in sql?

1087


Is like operator in sql case sensitive?

999


Do ddl statements need commit?

957


What is clause in sql?

1092


What is latest version of sql?

1027


Are subqueries better than joins?

956


What are reports usually used for?

1005


what is the bond code in materialized view?

2980


Which version of sql do I have?

1034


Can we create clustered index without primary key?

948


What is using in sql?

1060