|
Re: Using MAX() on a VARCHAR2 Column [message #2713 is a reply to message #2710] |
Wed, 07 August 2002 11:48 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
It is allowed, but the comparison will only be done on the first position and it is case-sensitive ('z' is a greater value than 'Z').
If you have numeric data in the varchar2 column, be sure to use the to_number function to allow the MAX to calculate correctly (otherwise '2' is greater than '10').
|
|
|
Re: Using MAX() on a VARCHAR2 Column [message #2896 is a reply to message #2710] |
Tue, 20 August 2002 07:26 |
Abul Fazal
Messages: 39 Registered: February 2002
|
Member |
|
|
Try the following query in sequence. Probably that will give u some idea.
Select ename from emp order by ename;
Select max(ename), min(ename) from emp;
Select ename from emp order by ename desc;
Select max(ename), min(ename) from emp;
|
|
|