• lalit.madan (7/19/2011)


    /*this behaves like inner join*/

    select * from freight_manager

    cross apply LargeOrderShippers ( freight_manager.min_value, freight_manager.max_value)

    /*this behaves like cross join*/

    select * from freight_manager

    outer apply LargeOrderShippers ( freight_manager.min_value, freight_manager.max_value)

    ๐Ÿ™‚

    I think you will find OUTER APPLY behaves more like LEFT (OUTER) JOIN.

    โ€œWrite the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.โ€ - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden