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

Name the operator which is used in the query for pattern matching?

592


What are the differences between in and exists clause?

674


Is primary key a clustered index?

620


What is sql server and ase?

627


Is sql an operating system?

622






how many tables will create when we create table, what are they? : Sql dba

647


What is delimiter in pl sql?

660


Explain the types of joins in sql?

651


Explain the components of sql?

691


what is the difference between blob and text? : Sql dba

622


Is oracle and sql same?

667


Is pl sql still used?

610


What is sql trigger example?

644


What will you get by the cursor attribute sql%notfound?

688


How global cursor can be declare with dynamic trigger ?

1850