An example with a table containing numbers from 1 up to 1234:
SQL> create table t (nr) as select level from dual connect by level <= 1234
2 /
Tabel is aangemaakt.
SQL> select min(nr)
2 , max(nr)
3 from t
4 /
MIN(NR) MAX(NR)
---------- ----------
1 1234
1 rij is geselecteerd.
If you analyze the table, the low_value and high_value columns contain the right numbers.
SQL> exec dbms_stats.gather_table_stats(user,'t')
PL/SQL-procedure is geslaagd.
SQL> select low_value
2 , high_value
3 from user_tab_columns
4 where table_name = 'T'
5 and column_name = 'NR'
6 /
LOW_VALUE HIGH_VALUE
---------------------------------------------------------------- ----------------
C102 C20D23
1 rij is geselecteerd.
They are raw, so they cannot be read easily. Using the utl_raw.cast_to_number function makes them readable:
SQL> select utl_raw.cast_to_number(low_value)
2 , utl_raw.cast_to_number(high_value)
3 from user_tab_columns
4 where table_name = 'T'
5 and column_name = 'NR'
6 /
UTL_RAW.CAST_TO_NUMBER(LOW_VALUE) UTL_RAW.CAST_TO_NUMBER(HIGH_VALUE)
--------------------------------- ----------------------------------
1 1234
1 rij is geselecteerd.
However, be careful: the numbers may be inaccurate when updates have taken place between the time the statistics were gathered and the time the query ran.
Regards,
Rob.