![]() |
inner join hola a todos, quisiera saber si es correcta la siguiente consulta: Código: select distinctrow event.id_event, event.event_name_es from event inner join client on event.id_client = client.id_client inner join client_enterprise on client_enterprise.id_client = client.id_client and client_enterprise.id_city = '1' inner join enterprise on enterprise.id_subcategorytype = '1'gracias de antemano abe_k |
El and ponlo en un where, esto: Cita:
|
no entiendo hola, aver si te he entendido. Tu me dices que todos los on vayan en un where? o sea, hacer un select , incluir todas las tablas en el from i todas las comparaciones en el where, es asi? abe_k |
Con inner join seria asi Tabla1 Dato1 DatoA Tabla2 Dato2 Dato1 DatoC select tabla1.dato1,tabla2.dato2 from tabla1 inner join tabla2 on(tabla1.dato1=tabla2.dato1) where tabla1.dato1=1 |
| La zona horaria es GMT -6. Ahora son las 07:29. |
Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.