I created a table with TIMESTAMP(9) in Oracle 10g. Then i tried to insert CURRENT_TIMESTAMP value in that column but unfortunately got the error message: value too large for column: (actual: 35, maximum: 25)
Then i tried this query:
select length(current_timestamp) from dual;
and the count was 35.
But Oracle does not allow me to define TIMESTAMP(35) while creating the table structure.
In such a case, how to define the Timestamp column while creating the table and how to insert the Current Timestamp value in the Timestamp column?
Can you post your table definition and the exact SQL statement you are using to insert the
CURRENT_TIMESTAMP? If you’re actually inserting aTIMESTAMPyou shouldn’t get that errorlength(current_timestamp)is implicitly converting the timestamp to a string and determining the length of that string. The error you are getting seems to imply that there is a similar conversion happening when you are trying to insert the data into the table.