Maximum length of a table name in MySQL

http://dev.mysql.com/doc/refman/5.7/en/identifiers.html

The following table describes the maximum length for each type of identifier.

Identifier Maximum Length (characters)
Database 64 (NDB storage engine: 63)
Table 64 (NDB storage engine: 63)
Column 64
Index 64
Constraint 64
Stored Program 64
View 64
Tablespace 64
Server 64
Log File Group 64
Alias 256 (see exception following table)
Compound Statement Label 16
User-Defined Variable 64 as of MySQL 5.7.5, no limit before that

Aliases for column names in CREATE VIEW statements are checked against the maximum column length of 64 characters (not the maximum alias length of 256 characters).

Identifiers are stored using Unicode (UTF-8). This applies to identifiers in table definitions that are stored in .frm files and to identifiers stored in the grant tables in the mysql database. The sizes of the identifier string columns in the grant tables are measured in characters. You can use multibyte characters without reducing the number of characters permitted for values stored in these columns. As indicated earlier, the permissible Unicode characters are those in the Basic Multilingual Plane (BMP). Supplementary characters are not permitted.

MySQL Cluster imposes a maximum length of 63 characters for names of databases and tables. See Section 19.1.6.5, “Limits Associated with Database Objects in MySQL Cluster”.

时间: 2024-10-10 18:15:45

Maximum length of a table name in MySQL的相关文章

Mysql:Changes in MySQL 5.7.13 (2016-06-02, General Availability):maximum length of MySQL user names was increased from 16 to 32 characters

Changes in MySQL 5.7.13 (2016-06-02, General Availability) Account Management Notes In MySQL 5.7.8, the maximum length of MySQL user names was increased from 16 to 32 characters, but some applicable contexts for this increase were overlooked. Additio

*Maximum Length Palindromic Sub-Sequence of an Array.

/* Write a function to compute the maximum length palindromic sub-sequence of an array. A palindrome is a sequence which is equal to its reverse. A sub-sequence of an array is a sequence which can be constructed by removing elements of the array. Ex:

646. Maximum Length of Pair Chain

Problem statement You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. Now, we define a pair (c, d) can follow another pair (a, b) if and only if b < c. Chain of pairs can be formed in this fashi

[LeetCode] Maximum Length of Repeated Subarray 最长的重复子数组

Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Input: A: [1,2,3,2,1] B: [3,2,1,4,7] Output: 3 Explanation: The repeated subarray with maximum length is [3, 2, 1]. Note: 1 <= len(A),

[leetcode] 718. Maximum Length of Repeated Subarray

Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Input: A: [1,2,3,2,1] B: [3,2,1,4,7] Output: 3 Explanation: The repeated subarray with maximum length is [3, 2, 1]. Note: 1 <= len(A),

718. Maximum Length of Repeated Subarray

#week9 Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Input: A: [1,2,3,2,1] B: [3,2,1,4,7] Output: 3 Explanation: The repeated subarray with maximum length is [3, 2, 1]. Note: 1 <= l

[Swift]LeetCode718. 最长重复子数组 | Maximum Length of Repeated Subarray

Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Input: A: [1,2,3,2,1] B: [3,2,1,4,7] Output: 3 Explanation: The repeated subarray with maximum length is [3, 2, 1].  Note: 1 <= len(A),

LeetCode 718. 最长重复子数组(Maximum Length of Repeated Subarray)

718. 最长重复子数组 718. Maximum Length of Repeated Subarray 题目描述 给定一个含有 n 个正整数的数组和一个正整数 s,找出该数组中满足其和 ≥ s 的长度最小的连续子数组.如果不存在符合条件的连续子数组,返回 0. LeetCode718. Maximum Length of Repeated Subarray 示例: 输入: s = 7, nums = [2,3,1,2,4,3] 输出: 2 解释: 子数组 [4,3] 是该条件下的长度最小的连

optimize table在优化mysql时很重要

一个表的数据量有1000W条,那么查看这么表占据的硬盘空间时会发现,数据本身是300M,索引是200M 这个时候,删除掉500W条数据,这个时候数据本身150M,而索引还是200M左右 你删除数据时,mysql并不会回收,被已删除数据的占据的存储空间,以及索引位. 而是空在那里,而是等待新的数据来弥补这个空缺,这样就有一个缺少,如果一时半会,没有数据来填补这个空缺,那这样就太浪费资源了. 所以对于写比较频烦的表,要定期进行optimize,一个月一次,看实际情况而定了. optimize tab