Question

When I choose DESC tablename, I see for some columns TIMESTAMP(3)(11). The 3 is the fractional seconds precision. What is the 11, and how can I define a column like this?

ALTER TABLE name ADD col TIMESTAMP(3)(11) for example gives ORA-00907: missing right parenthesis

Was it helpful?

Solution

I don't know of any second parameter to the TIMESTAMP type -- and even if there was one, I would expect to see TIMESTAMP(3,11) instead of what you are seeing.

I wonder if the version of SQLPlus you are using does not understand the data type properly and this is the best way it can represent it -- in which case the real data type might be something like TIMESTAMP(3) WITH TIME ZONE.

What timestamp is displayed if you select DATA_TYPE from ALL_TAB_COLUMNS for the column in question?

OTHER TIPS

TIMESTAMP(3)(11) means that the datatype would be TIMESTAMP(3), which allows a data length of 11. Not all tools (3rd party programs) shows it this way. But if you find a column marked as timestamp(3)(11) instead of just timestamp(3) there is no need to worry :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top