Search code examples
oracle-databasetimestampora-00907

Oracle TIMESTAMP type


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


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?