Question: While in Management Studio, I am trying to run a query/do a join between two linked servers.
Is this a correct syntax using linked db servers:

```
select foo.id 
from databaseserver1.db1.table1 foo, 
     databaseserver2.db1.table1 bar 
where foo.name=bar.name

```

Basically, do you just preface the db server name to the db.table ?

Answer: 
For what it's worth, I found the following syntax to work the best:

SELECT \* FROM [LINKED\_SERVER]...[TABLE]

I couldn't get the recommendations of others to work, using the database name. Additionally, this data source has no schema.
**Following Query is work best.**

> 
> Try this Query:
> 
> 
> 

```
SELECT * FROM OPENQUERY([LINKED_SERVER_NAME], 'SELECT * FROM [DATABASE_NAME].[SCHEMA].[TABLE_NAME]')

```

> 
> It Very helps to link MySQL to MS SQL
> 
> 
>