3
DBMS: SQL SERVER 2014 + Mysql 5.5
What are the syntax of SELECT, INSERT and UPDATE instead of using the "OPENQUERY" function, when connecting through the SQL SERVER Linked Server, connecting in Mysql?
3
DBMS: SQL SERVER 2014 + Mysql 5.5
What are the syntax of SELECT, INSERT and UPDATE instead of using the "OPENQUERY" function, when connecting through the SQL SERVER Linked Server, connecting in Mysql?
1
There is a way, configure the RPC Out for true
as in the figure below, in the properties of your Linked Server, which in this case is CONNECTMYSQLODBC:
Now do so:
Obs: generics
is the bank and cidades
the table name
Select:
Execute('SELECT * FROM `generics`.`cidades`') at CONEXAOMYSQLODBC
Insert
Execute('INSERT INTO `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, remembering that the best solution is with Openquery.
Thanks! solved the problem!
Browser other questions tagged mysql sql sql-server select-sql sql-update
You are not signed in. Login or sign up in order to post.
OPENQUERY is better option and with higher performance.
– Ruberlei Cardoso