Is there a "not allowed" character list for mysql table's column names?
10,057
Extracted from the MySQL docs assuming you are using at least MySQL 5.0 or higher:
Permitted characters in unquoted identifiers:
ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore)
Extended: U+0080 .. U+FFFF
Permitted characters in quoted identifiers include the full Unicode Basic Multilingual Plane (BMP), except U+0000:
ASCII: U+0001 .. U+007F
Extended: U+0080 .. U+FFFF
TL;DR
Answering your question, yes.. You can use the $
character in column names quoted or unquoted.
Related videos on Youtube
Author by
StudentX
Updated on September 19, 2022Comments
-
StudentX over 1 year
I couldn't find anything on google, maybe I am not searching the correct term. But is there a list of not allowed character for column names in mysql database ? I am particularly interested in the $ sign.
-
TomoMiha about 4 yearsIf this is true for quoted identifiers, then why is this giving me a duplicate value error: col1 ENUM('VŠS', 'VSS') ? Seems that only ASCII is allowed here...
-
Brandon White about 4 years@TomoMiha I think you are confusing
collation config
withpermitted characters
. Take a look at this question for more details: stackoverflow.com/questions/34387766/… -
TomoMiha about 4 yearsThanks, I found in the meanwhile that I had to change that COLLATION thing from ut8mb4_unicode_ci to utf8mb4_bin to make it work