Helio13 Posted July 25, 2012 at 02:07 PM Report Share #470254 Posted July 25, 2012 at 02:07 PM 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 More sharing options...
M6 Posted August 7, 2012 at 11:15 AM Report Share #471647 Posted August 7, 2012 at 11:15 AM Tens de criar um store procedure para fazer isso. Se queres apenas saber se há valores iguais, podes fazer count para obter esse valor. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar." Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now