What is the purpose of CTE (Common Table Expressions) in SQL?

  • Define a temporary result set for a single SELECT, INSERT, UPDATE, or DELETE statement.
  • Store large amounts of data in a tabular format.
  • Create a backup of the entire database.
  • Perform arithmetic operations on numeric data.
CTEs in SQL are used to define a temporary result set that can be referred to within a SELECT, INSERT, UPDATE, or DELETE statement. They enhance readability and maintainability by breaking down complex queries into modular parts. Options 2, 3, and 4 are incorrect as they do not reflect the purpose of CTEs.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *