I am creating a table with following script (I used Using index).
CREATE TABLE TABLE1 (
C1 VARCHAR2(2 CHAR) NOT NULL ENABLE,
C2 VARCHAR2(1 CHAR) NOT NULL ENABLE,
CONSTRAINT TABLE_PK PRIMARY KEY (C1) USING INDEX TABLESPACE SFE_I1
)
TABLESPACE SFE_D1;
In the above query index will create for what column?
CREATE INDEX IDX_TABLE ON TABLE1 (C1) TABLESPACE SFE_I1;
If I am creating index with the above create index query, it will create index for C1 column. But what is the difference between to this two scripts.
As well if I run both this query, what should happen. And what is the suggested way to do this?
If my create table script contains composite primary key and i am using USING INDEX keyword then how index will be created (will it create a single index for all the composite columns)