tags:

views:

142

answers:

0

I have a table who's column have alphanumeric on its value, how could i partition this using oracle?

Our current approach is

CREATE TABLE code_table
    (  firstchar varchar2(1),
    secondchar varchar2(1),
    thridchar varchar2(1),
         code      varchar2(40))

  Partition by list (firstchar)
    ( 
        partition c0 values ('0') tablespace s_ts_02_data,
        ....
         partition c9 values ('9') tablespace s_ts_02_data,
         Partition c10 values ('a','A') tablespace s_ts_02_data,
         .....
         Partition c23 values ('z','Z') tablespace s_ts_02_data
    ); 

Is there a better way to do this? And if i want to subpartition secondchar and thirdchar is there a way? Thanks