I want to copy a row for example whith ID=23
in a table A into another table with ID=30
into another database. I got this
INSERT INTO pacaya_control_venta.tb_venta_pacaya WHERE ID=33
SELECT * FROM llamadas.tb_venta_pacaya WHERE ID = 48;
But I think the double WHERE
is wrong. Any thoughts???
2
Answers
Is this what you need?
Assuming both the table contain the same columns (col1, col2, …) and the db are on the same server
for copy a row you should use update .. not insert
insert is for create a new row not for updated existing one