Syntax for database name MSSQL

yes I am using a script. I want to insert data into 2 tables (Same name) but they are on 2 different servers. They both work if they are selected as the default database connection.

Is it possible to change the database connection in the script?