SQL Language (MOSC)

MOSC Banner

create a global temporary table with primary key

edited Feb 18, 2010 3:59AM in SQL Language (MOSC) 3 comments
 Hi all, I hope that someone in this forum can help me to decide if the following is a bug or not.
In oracle 10.2.0.4.0 for SPARC (update 4) I have created a GTT:

CREATE GLOBAL TEMPORARY TABLE temp_tab1 (cnt, type primary key) ON COMMIT preserve rows AS
  SELECT count(*), object_type FROM all_objects GROUP BY object_type;

Everything with this seems fine and executes perfectly well, but when you try to access the tables rows via the primary key index you will get no rows selected:

select /*+ INDEX(a) */ type from temp_tab1 a; --this returns no rows

Is it a bug that the index used to enforce the primary key is "VALID", but empty??

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center