© Daniel Bartholomew 2017
Daniel BartholomewMariaDB and MySQL Common Table Expressions and Window Functions Revealedhttps://doi.org/10.1007/978-1-4842-3120-3_2

2. Non-recursive Common Table Expressions

Daniel Bartholomew
(1)
Raleigh, North Carolina, USA
 
You already got a taste of non-recursive CTEs in the previous chapter. This chapter will expand upon the previous examples and show more of the things you can do with non-recursive CTEs. In this chapter, we’ll cover some common uses of CTEs and finish with how to convert existing queries that use subqueries into queries that use CTEs.

Before We Begin

As with the previous chapter, the examples in this chapter utilize sample data . In addition to the employees table we used previously, in this chapter ...

Get MariaDB and MySQL Common Table Expressions and Window Functions Revealed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.