A long-time missing (and missed) functionality in MySQL, is sequences/ranges.
As of MySQL 8.0, this functionality is still not supported in a general sense, however, it’s now possible to generate a sequence to be used within a single query.
In this article, I’ll give a brief introduction to CTEs, and
explain how to build different sequence generators; additionally,
I’ll introduce the new (cool) MySQL 8.0 query hint
SET_VAR, and a pinch of virtual columns and
functional indexes (“functional key parts”, another MySQL 8.0
feature).
Contents:
[Read more]