An sql_name is either a standard SQL name starting with a Latin alphabet character and that contains only Latin characters, numbers and/or underscores, or a square-bracketed string. The right square bracket is escaped by doubling.
Examples:
String to pass | sql_name |
MySQLName_2 | MySQLName_2 |
My non-standard !&^#%!% name | [My non-standard !&^#%!% name] |
[already-bracketed name] | [[already-bracketed name]]] |
name with brackets[] inside | [name with brackets []] inside] |