Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/07/2017, 14:04
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 17 años, 8 meses
Puntos: 774
Respuesta: Select dependientes en Procedure + CURSOR

La mas optima haciendo un join, para que el cursor??

Código MySQL:
Ver original
  1. select * from table2 as t1
  2. left join table1 as t2 on (t1.id=t2.id)

Y ahi sacas todos los registros que estan en tabla 1 y tabla2
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me