Which Query execute this query faster

  • Queries Using Multiple Tables can incorporate fields from two different tables We can then combine them by using an inner join between the tables or use the simple where clause.

    Using the inner join

    SELECT [Customers].[Company Name], [Orders].[Employee ID]

    FROM [Customers] INNER JOIN [Orders]

    ON [Customers].[Customer ID] = [Orders].[Customer ID]

    Using the where clause

    SELECT [Customers].[Company Name], [Orders].[Employee ID]

    FROM [Customers], [Orders]

    WHERE [Customers].[Customer ID] = [Orders].[Customer ID]

    I just had a doubt in mind which of these queries would run in a faster and optimized way. I am using SQL server 2000

    Thanks!

    Prasad

  • hi prasad,

    please check the query execution plan for both statements. it shows same plan and costs.

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply