user1896796
user1896796

Reputation: 749

Putting a timestamp to the records after pulling at regular intervals

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

Answers (1)

juergen d
juergen d

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

Related Questions