Connecting Tech Pros Worldwide Help | Site Map

possible to create index on a column which contains NULL values

Newbie
 
Join Date: May 2007
Location: india
Posts: 13
#1: May 24 '07
Dear friends,

My oracle version is 10 G.
I have a table vactype,this table contains vac id column have null values.
i want to create an index in vac id column is possible create index in null
column?

Any body help me.

Expecting ur replies..


Hastha23.
Expert
 
Join Date: May 2007
Location: India
Posts: 101
#2: May 24 '07

re: possible to create index on a column which contains NULL values


Quote:

Originally Posted by hastha23

Dear friends,

My oracle version is 10 G.
I have a table vactype,this table contains vac id column have null values.
i want to create an index in vac id column is possible create index in null
column?

Any body help me.

Expecting ur replies..


Hastha23.

Hi Hastha,
It is possible to create index on a column which contains NULL values.

Regards,
Pradeep.
Newbie
 
Join Date: May 2007
Location: india
Posts: 13
#3: May 24 '07

re: possible to create index on a column which contains NULL values


dear friend,

which index i choosing?
unique ,non unique is possible to create index in null column?

PLease replies..
Expert
 
Join Date: May 2007
Location: India
Posts: 101
#4: May 24 '07

re: possible to create index on a column which contains NULL values


Quote:

Originally Posted by hastha23

dear friend,

which index i choosing?
unique ,non unique is possible to create index in null column?

PLease replies..

Hi hastha,
Unique Index is also possible.

Regards,
Pradeep.
Newbie
 
Join Date: Nov 2007
Posts: 1
#5: Nov 29 '07

re: possible to create index on a column which contains NULL values


Index will not be applied on the null values. Like if in a query i write

suppose i have the index on column_1 of table_1
and when i fire the query mentioned below

select * from table_1 where column_1 is null;

then index is not used.

for resolving it with some twiking, you can follow the link
http://www.dba-oracle.com/oracle_tips_null_idx.htm
Reply