abipc
abipc

Reputation: 1035

MySQL Error - Join tables from two different databases

MySQL query

select s.site_id,s.site_name,u.username 
FROM cloud_search.dbo.site_request s join user_db.dbo.user_info u 
on u.user_id=s.site_id;

Error

ERROR 1064 (42000): 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 '.site_request s join user_db.dbo.user_info u on u.user_id=s.site_id' at line 1

What am i doing wrong here..?

Upvotes: 0

Views: 55

Answers (1)

Orel Eraki
Orel Eraki

Reputation: 12196

Are you sure you're using dbo it's usually for MSSQL

It's probably

select s.site_id,s.site_name,u.username FROM cloud_search.site_request s join user_db.user_info u on u.user_id=s.site_id;

Upvotes: 2

Related Questions