DBMS: SQL SERVER 2014 + MySQL 5.5
What are the SELECT, INSERT, and UPDATE syntax instead of using the "OPENQUERY" function, when connecting through the SQL Server Linked Server, connecting to MySQL?
DBMS: SQL SERVER 2014 + MySQL 5.5
What are the SELECT, INSERT, and UPDATE syntax instead of using the "OPENQUERY" function, when connecting through the SQL Server Linked Server, connecting to MySQL?
There is a way, set RPC Out to true
as in the figure below, in the properties of your Linked Server, which in this case is CONEXAOMYSQLODBC :
Nowdoso:
Note:generics
isthebankandcidades
thetablename
Select:
Execute('SELECT*FROM'generics'.'cidades'')atCONEXAOMYSQLODBC
Insert
Execute('INSERTINTO'generics'.'cidades'('ufid','cidade')VALUES(1,"ROSANA")') at CONEXAOMYSQLODBC
Update
Execute('UPDATE 'generics'.'cidades' SET 'cidade'="Presidente Venceslau" WHERE 'cidadeid'=10') at CONEXAOMYSQLODBC
Delete
Execute('DELETE FROM 'generics'.'cidades' WHERE 'cidadeid'=10') at CONEXAOMYSQLODBC
But remember that the best solution is with OpenQuery .