Inserting a Column with a Data Type TIME

Asked By 20 points N/A Posted on -

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..? 

Answered By 0 points N/A #100805

Inserting a Column with a Data Type TIME



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.

Login/Register to Answer

Related Questions