You asked: I need to have a query which will give me the smallest value in a table and the column containing it. Please note there can be any number of columns. All will be number data type.
We said: This can be achieved by unpivoting the result set and then group them to find their minimum value as shown below.
Tips and Tricks in Oracle Advanced Concepts
Subscribe to:
Posts (Atom)
-
We have encrypted our data while storing it in the database, but have we ever tried to encrypt our PL/SQL subprograms while creating them? T...
-
The NVL and the COALESCE functions are basically the same. They return the first NOT NULL argument and if there are no NOT NULL arguments, ...
-
When we mix SQL and PL/SQL together, we get context switches. That is, the control is switched from the SQL engine to the PL/SQL engine and...
