Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Select max(id) not returning correct value
Jacinta,
What is the datatype of the ID column? Is it NUMBER or a text datatype? If not number, then what are your NLS settings?
Please do a DESCRIBE of the table/view in question and also SHOW PARAMETER NLS? -Tim
on 5/19/05 9:22 PM, Kean Jacinta at jacintakean_at_yahoo.com wrote:
> Hi ,
>
> I found that the select max(id) from tablename does
> not give me the correct value.
>
> My current table has
>
> ID
> --
> 1
> 2
> 3
> 4
> 5
> 87
> 95
>
> All this id is namually inserted. When i query
>
> select max(id) from mytable;
> It will not return 95 instead it will return value 5 ?
>
> Anyone encounter this problem before?
>
> JK
-- http://www.freelists.org/webpage/oracle-lReceived on Fri May 20 2005 - 06:53:09 CDT
![]() |
![]() |