Unicode SQL fields (accented field names)

{problem}

For ease of use, the names of SQL fields should reflect the language of the development team. However, running something like

CREATE TABLE salary (code STRING, nom STRING, prénom STRING);

results in the error

expected ASCII identifier got énom

{problem}

{solution}

Unicode strings should be wrapped in double quotes, e.g.

CREATE TABLE salary (code STRING, nom STRING, "prénom" STRING);

{solution}

Have more questions? Submit a request

Comments