No of visitors who read this post: 147
Category: DB2
Type: Question
Author: Morblack
No votes yet

Hello everyone.

I just want some help on this. I want to insert a column n in my database with a data type TIME.

I already did some research but it still wont work. The error says it overflows.

Does anyone care to give me the right syntax and example in inserting this type of column n n..? 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

#

Hi Morblack,

First thing to check is the width of the data you are about to insert to the column. Check also the column width to see if the size is large enough to hold the your data. Double check also your INSERT statement, the columns must stay in sync with the values on the right. For example, INSERT INTO table (col1, col2, col3, col4) values (val1, val2, val3, val4);.. Check if the values on the right has the same data type with the columns on the left. You also need to check the format of the date time in your database by checking the database schema. For most databases this task is every easy to do. It is possible that the format you are about to insert is not considered valid on the database server you are using

 I hope it helped.