Where we are going to use "Derived Tables" (In which scenario they are mandatory) ?

Posted on 2008-11-09
Last Modified: 2012-05-05

Can you please let me know in which scenarios derived tables are mandatory to use ?

Question by:milani_lucie
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    from syntax point of view, they are not "mandatory". you could always solve the problem with temp tables.
    from performance point of view, they are very useful and powerful.
    LVL 17

    Accepted Solution

    Agreed, I prefer the use of derived but not required.
    LVL 22

    Expert Comment

    A "derived table" is a syntax for creating a temporary name (alias) for a table expression within the scope of a single query. It is used mainly to simplify the SQL by using the name instead of repeating a complex expression.

    The only time I can think of when derived tables are essential is for recursive queries (recursive CTEs). A recursive CTE (Common Table Expression) is a special kind of derived table.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Suggested Solutions

    After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
    In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    This video discusses moving either the default database or any database to a new volume.

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now