Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Union 2 table on 2 pc

Status
Not open for further replies.

chinedra

Programmer
May 10, 2007
2
IT
hi,
how can join 2 table of 2 db on 2 different pc ?

In sqlServer i just do:
selet * from pc1.dbo..db1.table1
union
selet * from pc2.dbo..db2.table2

in MySql ?????????

Thanks and sorry for my english !!!
 
Just remove one of the periods between the database name and the table name like this:

Code:
selet * from pc1.dbo.db1.table1
union
selet * from pc2.dbo.db2.table2
 
I have try it, but not function.
Error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.DB.Table' at line 1
 
I don't think this will work - e.g. how do you authenticate yourself on the second server using query? ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top