These are called function based indexes. To use them you need Enterprise Edition. On my 8iEE server I do so like this:
SQL> create table test (col1 varchar2(20));
Table created.
SQL> create index function_test_idx on test (SUBSTR(col1,1,1));
Index created.
It might not be necessary to do this depends on what you are trying to do. Just build the index as normal and it should have the same effect. When using queries like:
where col1='A'
If you want to make the indexes smaller. You should look at the COMPRESS argument in the create index statement. In an nutshell if you have data like.
TESTxxx
TESTyyy
TESTzzz
Using the compress argument will only store
xxx
yyy
zzz
I.E. it will compress common data so that it is only stored once.
This avoid the need for SUBSTR(col1,4). Thus it cuts down on the number of blocks need to store then index so you get less block reads when you do an index scan.
Hope that helps...