sql-parser icon indicating copy to clipboard operation
sql-parser copied to clipboard

Support NVARCHAR

Open lem9 opened this issue 8 years ago • 1 comments

See https://dev.mysql.com/doc/refman/5.7/en/string-type-syntax.html and https://stackoverflow.com/questions/44212793/how-to-make-nvarchar-column-in-phpmyadmin

lem9 avatar May 27 '17 12:05 lem9

Thanks Marc for the report.

These are the syntax variations we need to accept (copied from the manual page):

CHAR(10) CHARACTER SET utf8 NATIONAL CHARACTER(10) NCHAR(10)

and

VARCHAR(10) CHARACTER SET utf8 NATIONAL VARCHAR(10) NVARCHAR(10) NCHAR VARCHAR(10) NATIONAL CHARACTER VARYING(10) NATIONAL CHAR VARYING(10)

Also: "You can use N'literal' (or n'literal') to create a string in the national character set."

SELECT N'some text'; SELECT n'some text'; SELECT _utf8'some text';

ibennetch avatar May 27 '17 13:05 ibennetch