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

Is mariadb nosql?

581


Are sql database names case sensitive?

495


What are reports usually used for?

564


What are the two parts of design view?

579


What is dense_rank in sql?

539






How long will it take to learn pl sql?

522


What are the types of triggers in sql?

494


what are the performance and scalability characteristics of mysql? : Sql dba

526


What are the benefits of triggers?

595


Name some usages of database trigger?

562


Is subquery faster than join?

568


What makes a good primary key?

519


What is identity column in sql server?

527


How show all rows in sql?

608


What are different types of functions in sql?

511