question

myssridhara avatar image
myssridhara asked

Time stamp

Hi, I want to insert the all the columns from one table to another table. But due to timestamp field, I am not able to insert all the fields at a time. It is showing the error message. Cannot insert an explicit value into a timestamp column. Use INSERT with a column list to exclude the timestamp column, or insert a DEFAULT into the timestamp column. Please help
time
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Moved from the meta section to main site.
0 Likes 0 ·

1 Answer

·
tanglesoft avatar image
tanglesoft answered
I assume the timestamp field is of datatype timestamp. As this is intended to be unique system generated value I don't think you can copy the value to another table with the same structure including the timestamp field. Either you only create a column list that excludes the timestamp field or you will need to cast it to another type such as varbinary(8).
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.