The problem of mysql horizontal subtable

if you currently need to generate a table each month to store the current month"s data, the following table will be generated:

tablename_201709
tablename_201710
tablename_201711
tablename_201712
tablename_201801
tablename_201802
tablename_201803
tablename_201804
.......

so the question is: how to count the total data from 2017 to 2018?

Mar.01,2021

select gives the total data for each table from 17 to 18 years, and then the sum in memory is the total data from 2017 to 2018.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9b24b-182d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9b24b-182d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?