What are the Advantages of using CTE?

Posted by

To view Verified answers click on the button below.

1. Using CTE improves the readability and makes maintenance of complex queries
easy.

2. The query can be divided into separate, simple, logical building blocks which can be
then used to build more complex CTEs until final result set is generated.

3. CTE can be defined in functions, stored procedures, triggers or even views.

4. After a CTE is defined, it can be used as a Table or a View and can SELECT, INSERT,
UPDATE or DELETE Data.