-  unique
-  nonunique
-  concetaneted
-  function based
-  partioned
-  B‐tree
-  Bitmap
SQL> create index hr.employees_last_name_idx on hr.employees(last_name)
Pctfree 30
Storage (
Initial 200k next 200k
Pctincrease 0
Maxextents 50
Tablespace indx);
Create bitmap index orders_region_id_idx on orders(region_id)
Pctfree 30
Storage (
İnitial 200k next 200k
Pctincrease 0
Maxextents 50
Tablesapce indx);
Alter index orders_region_id_idx allocate extent (size 200k datafile ‘/disk1/...’);
Alter index orders_region_id_idx deallocate unused;
Alter index orders_region_id_idx rebuild tablespace indx02; //move index to a different tablespace
Alter index orders_region_id_idx rebuild online;
Alter index orders_region_id_idx coalesce;
Analyze index orders_region_id_idx validate structure;            //query index_stats
Drop index hr.employees_name_index;
Alter index hr.dept_id_idx monitoring usage nomonitoring;            //query v$object_usage
-  not null
-  uniwue
-  primary key
-  foreign key
-  check
States of constrains
-  disable novalidate
-  disable validate
-  enable novalidate
-  enable validate
SQL> create table hr.employees (
Id number(7) constraint employee_id_pk primary key deferrable using index,
Last_name varchar2(25) constraint employee_last_name_nn not null);
Alter table hr.employee enable validate constraint emp_dept_fk;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: