0
Good afternoon, I am beginner in sql server and I came across a situation that raised this doubt. I wonder if it is possible to copy a table from one database to another, in the situation where both are on the same server.
If it is not clear the text, it would be as in the image shown, the two banks have exactly the same tables, but the "ORIGIN" has in the table dbo.cidadesibge several records that I would like to put in the database "DESTINATION" in the same table dbo.cidadesibge. I looked in some pages, read that there were some forms, but I could not find any answer that would explain me how to accomplish. I thought to accomplish with "Select * Into" also could not get any way to work in this case, if someone can explain me how to accomplish thank you for the help.
@bfavaretto
INSERT INTO Destino.Schema.Tabela (Column1, ..) SELECT Column1,.. FROM ORIGEM.Schema.Tabla;
– Ilyes
Oops, you’re right @Sami
– bfavaretto
You want to copy all information from BD ORIGIN or just data from dbo.cidadesibge table?
– Alberto Cláudio Mandlate
in the example situation I gave would be the case of copying the data from the source table to the destination table, knowing that the two are identical in columns and name
– Danilo Vilhena