MySQL 8.0: Common Table Expressions

Topics: Optimizer

Common Table Expressions (sometimes referred to as WITH queries) are a new feature that will be available in MySQL 8.0. In their simplest form CTEs are a way of creating a view/temporary table for usage in a single query, and can help improve the readability of SQL code. They have many more use cases, however, in particular when using the RECURSIVE form of CTEs it is possible to perform advanced tasks with few lines of code. This presentation covers CTEs implementation in MySQL 8.0.