Inner Join vs implicit inner join


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Inner Join vs implicit inner join

Hybrid View

  1. #1
    Max Max Guest

    Inner Join vs implicit inner join


    I know that the following two queries will produce the exact same results.
    But will the compiler compile:

    SELECT U.UserID, U.UserName, P.Printer_Name
    FROM User U
    INNER JOIN Printer P
    ON(U.UserID = P.UserID)

    the exact same as:

    SELECT U.UserID, U.UserName, P.Printer_Name
    FROM User U, Printer P
    WHERE U.UserID = P.UserID

    Is there a benefit, cost-wise, to using one over the other?

  2. #2
    David Satz Guest

    Re: Inner Join vs implicit inner join

    they do not always produce the same results for outer joins, but using the
    ANSI syntax (INNER JOIN) is more portable and will be supported - while one
    day MS will stop supporting the old style joins.
    --
    HTH,
    David Satz
    Principal Web Engineer
    Hyperion Solutions
    { SQL Server 2000 SP1/7.0 SP3/6.5 SP5a } { Cold Fusion 5/4.5.1 SP2 } { VSS }
    (Please reply to group only - emails answered rarely)
    -----------------------------------------------------------------
    "Max Max" <Max@zzz.moc> wrote in message news:3c3c5041$1@147.208.176.211...
    >
    > I know that the following two queries will produce the exact same results.
    > But will the compiler compile:
    >
    > SELECT U.UserID, U.UserName, P.Printer_Name
    > FROM User U
    > INNER JOIN Printer P
    > ON(U.UserID = P.UserID)
    >
    > the exact same as:
    >
    > SELECT U.UserID, U.UserName, P.Printer_Name
    > FROM User U, Printer P
    > WHERE U.UserID = P.UserID
    >
    > Is there a benefit, cost-wise, to using one over the other?




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center