相关文章推荐
Comprehensive support to navigate MySQL 5.7 EOL, whether you're looking to upgrade to MySQL 8.0 or stay supported on 5.7. Learn More All of Percona’s open-source software products, in one place, to download as much or as little as you need. View Downloads

Percona Events Hub

See all of Percona’s upcoming events and view materials like webinars and forums from past events

Percona Live 2023

Upcoming Events

View Our Events

Percona is an open source database software, support, and services company that helps make databases and applications run better.

Learn More

See Percona’s recent news coverage, press releases and industry recognition for our open source software and support.

News coverage Press Releases

Generating Numeric Sequences in MySQL What is the easiest way to generate a sequence of integers in MySQL? In other words, which “SELECT <something>” statement should I write to get 0, 1, 2, … N – 1?

This is the question I have been struggling with for years and it looks like I have finally got the answer (although I must admit I had to put some development efforts and add a few hundred lines to the server code). Percona Server for MySQL 8.0.20-11 includes a new feature dedicated to solving exactly this problem.

However, before revealing all the secrets, let us first consider existing solutions. So, we want to get the following:

 
推荐文章