Rob Bamforth's Blog
Java, SQL,T-SQL, MySQL, Networking, SQL Server, PHP, COM, DBA, ODBC

Posts Tagged ‘MySQL’

Query MySQL Database From SQL server

October 20, 2008

Follow the following instructions to create a linked server between
SQL Server Management Studio and a MySQL database -
http://robbamforth.wordpress.com/2008/10/17/connect-to-mysql-database-from-sql-server/
Use the OPENQUERY command to retrieve data from the MySQL database.
The syntax is as follows, where DATA is the name for the ODBC Linked Server
previously created. TABLE is the name of the MySQL table:
SELECT *
FROM
OPENQUERY(DATA, ’select * from [...]