Re: query using index get no row?

From: DA Morgan <>
Date: Fri, 18 Apr 2008 09:35:32 -0700
Message-ID: <> wrote:
> I had this two queries:
> select * from table where id = number;
> select /*+ NO_INDEX (table PK_IDX)*/ * from table where id = number;
> When query used index no row was returned. Index is on primary key
> column and status in user_indexes was 'VALID'.
> I rebuild index but problem is not fixed.
> I fixed problem with:
> alter index PK_IDX unusable;
> and then
> alter index PK_IDX rebuild;
> What was problem?
> Goran

Please post full and complete version number, operating system and your real DML. Not the phony statement you posted in your query.

   2 testcol DATE);
ERROR at line 1:
ORA-00903: invalid table name

SQL> It should be further noted that ID is a reserved word and should never be used as a column name.

Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington (replace x with u to respond)
Puget Sound Oracle Users Group
Received on Fri Apr 18 2008 - 11:35:32 CDT

Original text of this message