INSERT INTO ... SELECT * FROM (remote)
INSERT INTO ... SELECT * FROM (remote) is a SQL statement in the DML Statements category. Cross-server INSERT using linked servers (SQL Server) or dblink (PostgreSQL) or federated tables (MySQL). The syntax is INSERT INTO local_table SELECT * FROM linked_server.database.dbo.remote_table;. It returns inserted rows from remote. A typical example: -- SQL Server (linked server): INSERT INTO local_employees SELECT * FROM [REMOTE_SERVER].company.dbo.employees; -- PostgreSQL (dblink): CREATE EXTENSION dblink; INSERT INTO local_employees SELECT * FROM dblink('host=remote_host dbname=sales', 'SELECT id, name, salary FROM employees') AS t(id INT, name TEXT, salary DECIMAL); -- MySQL (federated): CREATE TABLE federated_employees (...) ENGINE=FEDERATED CONNECTION='mysql://user:pass@remote_host:3306/db/employees'; A close relative is INSERT INTO, which inserts new rows into a table. A close relative is UPDATE, which modifies existing rows in a table. Always use WHERE to avoid updating all rows. A close relative is DELETE, which removes rows from a table. Always use WHERE to avoid deleting all rows.