Retroceder   Foros del Web > Programación para sitios web > Bases de Datos

Respuesta
 
Herramientas Desplegado
Antiguo 24-ene-2005, 03:21   #1 (permalink)
eemece2 está en el buen camino
 
Fecha de Ingreso: mayo-2003
Mensajes: 28
con o sin INNER JOIN

Hola a todos,

Tengo una duda creo que basica,

¿Cuales son las diferencias entre estas dos instucciones?:

Código:
SELECT
    P.CreatedByUser,
    P.CreatedDate,
    P.ModuleID,
    PL.Lang,
    PL.Title,
    PL.Description,
    CL.Name AS Category

FROM Portal_Projects P 

INNER JOIN Portal_ProjectsLoc PL
ON P.ItemID = PL.ItemID
INNER JOIN Portal_Categories C
ON P.CategoryID = C.ItemID
INNER JOIN Portal_CategoriesLoc CL
ON C.ItemID = CL.ItemID

WHERE
    P.ItemID = @ItemID AND PL.Lang = CL.Lang
GO
y este:

Código:
SELECT
    P.CreatedByUser,
    P.CreatedDate,
    P.ModuleID,
    PL.Lang,
    PL.Title,
    PL.Description,
    CL.Name AS Category

FROM Portal_Projects P 
, Portal_ProjectsLoc PL
, Portal_Categories C
, Portal_CategoriesLoc CL

WHERE
	P.ItemID = @ItemID AND
	PL.Lang = CL.Lang AND
	P.ItemID = PL.ItemID AND
	P.CategoryID = C.ItemID AND
	C.ItemID = CL.ItemID
GO
¿Es necesario poner los INNER JOIN por algun tema de claves, restricciones, rendimiento (o al reves)?

Gracias y un saludo,
Edu
eemece2 está desconectado   Responder Citando
Respuesta
No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Activado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 04:56.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93