1

So I'm trying to create a copy of one of my tables into an index organized table, However I get an error, here is the code.

create table clients2 as
select *
from clients
organization index;

ORA-00933:"SQL command not properly ended"

1
  • 1
    as subquery is the last part of table_properties which follow physical_properties where you specify storage parameters. Commented Nov 11, 2021 at 16:23

1 Answer 1

4

Your command is wrong.

SQL> create table testiot ( object_id primary key,object_name ) 
     organization index 
     as select object_id,object_name from dba_objects 
     where object_id is not null ;

Table created.

SQL> select count(*) from testiot ;

  COUNT(*)
----------
    208730

Organization index must be in the definition of the table and before as select. On the other hand, you need to define the columns in the table and which one is the primary key for IOT.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.