Jump to content

Obter resultado do Join de duas tabelas


Helio13

Recommended Posts

Boa tarde!

Estou a fazer um inner join de duas tabelas...

DELIMITER $$

CREATE DEFINER=`root`@`localhost` PROCEDURE `Join`()

BEGIN
 Select sip2.temp_teste.sitio
 from sip2.temp_teste
   inner join sip2.teste
   on sip2.temp_teste.sitio = sip2.teste.sitio;
END

E gostava de saber como consigo saber o resultado do Join?

Pois, se o Join for 0, quer dizer que não há valores iguais, entao eu faria o insert dos registos da tabela temporária para a tabela final...

Alguém me pode explicar como posso fazer?

Obrigado

Cumprimentos

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.