sql-parser
sql-parser copied to clipboard
Support NVARCHAR
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
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';