Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Select max(id) not returning correct value

Re: Select max(id) not returning correct value

From: Tim Gorman <tim_at_evdbt.com>
Date: Fri, 20 May 2005 04:48:23 -0600
Message-ID: <BEB31C97.279C6%tim@evdbt.com>


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-l
Received on Fri May 20 2005 - 06:53:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US