top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is maximum length of a table name, database name and field name in Mysql?

+3 votes
876 views
What is maximum length of a table name, database name and field name in Mysql?
posted May 5, 2014 by Sachin Dahda

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

I have not tested by as per the following documentation it is 64 in all three cases
http://dev.mysql.com/doc/refman/5.0/en/identifiers.html

Identifier    Maximum Length (characters)
Database      64
Table         64
Column        64
Index         64
Constraint    64
Stored Procedure or Function    64
Trigger       64
View          64
Alias         256 
Compound Statement Label    16
answer May 6, 2014 by Salil Agrawal
Similar Questions
+3 votes

I have started learning PHP and got a thought about mysql.

I did google and found this stack overflow link
http://stackoverflow.com/questions/625930/what-is-the-maximum-size-of-a-mysql-database-in-version-5-and-up

But there are less answers and more discussions. Can someone give me the right answer which has full description in it.

+2 votes

I have a date field on an html form that users may leave blank. If they do leave it blank I want to write the date 01/01/1901 into the mysql table. How can I accomplish this and where in my .php script file should I put the code?

...