The other answers cover the solution, which is to use backticks.
Let me add that using non-standard identifiers is a bad idea. If you start naming columns as number as well, who wants to figure out the differences between 20181020.1
, 20181020
.1
, and 20181020.1
. Is it so hard to use a prefix: t_20181020
?
But you don't want to do that either. Let me explain. Presumably, if you have one table called 20181020
, then tomorrow you will want another table 20181021
. This is a really bad database design.
You should be putting all the data into a single table, with a date
column specifying the date. You can then run queries over one table to see changes over time -- for instance.
If the tables are large and you want the ability to manipulate each day separately, then you use table partitioning to store each day's worth separately. This is handy, because partitions can be archived, restored, and dropped independently of other partitions.