Foros del Web

Foros del Web (http://www.forosdelweb.com/)
-   Bases de Datos General (http://www.forosdelweb.com/f21/)
-   -   con o sin INNER JOIN (http://www.forosdelweb.com/f21/con-sin-inner-join-264380/)

eemece2 24/01/2005 04:21

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


La zona horaria es GMT -6. Ahora son las 12:57.

Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.