Re: DBMS_SPACE.CREATE_TABLE_COST

Posted by ErmanArslansOracleBlog on
URL: http://erman-arslan-s-oracle-forum.114.s1.nabble.com/DBMS-SPACE-CREATE-TABLE-COST-tp6907p6910.html

Hi Roshan,

I didn't understand what exactly you are asking.  But I will still try to answer..

If you are asking about the length of date column -> Oracle Database uses its own internal format to store dates. Date data is stored in fixed-length fields of seven bytes each, corresponding to century, year, month, day, hour, minute, and second.

So, there is no length that you can supply for date, it is already fixed.

So you can use the DATE as follows;

sys.create_table_cost_colinfo('DATE',NULL)

As for the number data type -> column_name NUMBER (precision, scale)
precision = """total""" number of digits
scale = number of digits to the right of the decimal point

So you can use the precision for the colinfo, like the following;

sys.create_table_cost_colinfo('NUMBER',9),