Reputation: 749
I have one database table with the following columns .
ZoneName ZoneCount
I want to copy this data to another db table with a time stamp .
I can copy using the following query
insert into ... select * FROM ...
My question is how do i add timestamp to it , if i am running this query at every 15 min.
Upvotes: 0
Views: 31
Reputation: 204924
You can use NOW()
or CURRENT_TIMESTAMP
insert into destination_table (col1, col2, col3)
select ZoneName, ZoneCount, NOW()
FROM source_table
Upvotes: 1