mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
New syntax:
CREATE TABLE t1(a NVARCHAR(10)) This is for compatibility with MSSQL, DB2, Informix and some other DBMSs. Note, standard SQL doesn't have "NVARCHAR" syntax. There are only these syntaxes in SQL2003: NATIONAL VARCHAR NCHAR VARCHAR NATIONAL CHARACTER VARYING NCHAR VARYING - Tests were added for all the above syntaxes. sql/lex.h: New syntax: CREATE TABLE t1(a NVARCHAR(10)) This is for compatibility with MSSQL, DB2, Informix and some other DBMSs. Note, standard SQL doesn't have "NVARCHAR" syntax. There are only these syntaxes in SQL2003: NATIONAL VARCHAR NCHAR VARCHAR NATIONAL CHARACTER VARYING NCHAR VARYING sql/sql_yacc.yy: New syntax: CREATE TABLE t1(a NVARCHAR(10)) This is for compatibility with MSSQL, DB2, Informix and some other DBMSs. Note, standard SQL doesn't have "NVARCHAR" syntax. There are only these syntaxes in SQL2003: NATIONAL VARCHAR NCHAR VARCHAR NATIONAL CHARACTER VARYING NCHAR VARYING
This commit is contained in:
0
mysql-test/r/type_nchar.result
Normal file
0
mysql-test/r/type_nchar.result
Normal file
35
mysql-test/t/type_nchar.test
Normal file
35
mysql-test/t/type_nchar.test
Normal file
@ -0,0 +1,35 @@
|
||||
#
|
||||
# Test nchar/nvarchar
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (c nchar(10));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (c national char(10));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (c national varchar(10));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (c nvarchar(10));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (c nchar varchar(10));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (c national character varying(10));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (c nchar varying(10));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user