Skip to content
Advertisement

INSERT INTO SELECT with CURRENT_TIMESTAMP value

I have a query that takes all data from database A and inserts it into database B. It is working correctly, however I created a new column in database B called “actual_date” and I would like that, when inserting the data in database B, also insert the current date when these values ​​were entered in database B.

Something like:

Obviously the above query is wrong, but it would be something like this, because in database A, there is no column with the current date.

Is this possible?

Advertisement

Answer

Use Date():

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement