MySQL: Maximum Length of a Column and Table Name
Question by Guest | 2015-06-03 at 19:41
Currently, I am creating a new MySQL database and I had to recognize that some of my names for the columns and tables have become pretty long. The reason is that I am used to give names reflecting potential connections between the fields.
Now, I wonder how long a name of a column or a table in MySQL could actually be at the maximum? Or isn't there any limit?
Related Topics
MySQL: Add new Column to a Table
Tutorial | 0 Comments
MySQL: Delete Data from Table - Difference between TRUNCATE, DELETE and DROP
Tutorial | 0 Comments
MySQL: 3 Ways of showing Table Definition and Structure
Info | 0 Comments
MySQL: Write current Date or Time into Column
Tutorial | 0 Comments
SQLite: Check whether Table exists
Info | 0 Comments
MySQL: Change minimum word length for full text search
Tip | 1 Comment
jQuery: Does an Element exist?
Tip | 1 Comment
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
The name of a table as well as the name of the column can consist of 64 characters at the maximum in MySQL.
In this table, I have also listed all of the other limits for names and identifiers in MySQL.
2015-06-03 at 19:50
Is it possible to increase the number of characters in the names of the tables?
So, from 64 characters to 100 characters, for example?
2020-09-15 at 21:12
Since this is a limitation of MySQL, which is also stated in the documentation, I assume that this is not possible. Otherwise this possibility would also be described on that site.
What you can do is possibly (depending on the context) to go via the alias functionality. So "old_short_name AS new_long_name". 256 characters are allowed for this (more than 64).
2020-09-16 at 11:18