SQL_MODE=MSSQL
You are viewing an old version of this article. View
the current version here.
Migrating from SQL Server? Contact the MariaDB migration experts!
Contact UsIn MariaDB 10.4.6 and later, setting the sql_mode system variable to MSSQL
allows the server to understand a small subset of Microsoft Server's language. For example:
SET SQL_MODE='MSSQL';
In MariaDB 10.4.6 SET SQL_MODE=ORACLE
is an alias for the following sql_mode:
PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,MSSQL,NO_KEY_OPTIONS,NO_TABLE_OPTIONS, NO_FIELD_OPTIONS
For the moment the MSSQL
has only very limited functionality, but we plan to add more after hand according to demand.
Supported Syntax in MSSQL Mode
Using [] for quoting
One can use [] instead of "" or `` for quoting identifiers:
SET SQL_MODE="MSSQL"; CREATE TABLE [t 1] ([a b] INT); SHOW CREATE TABLE [t 1]; Table Create Table t 1 CREATE TABLE "t 1" ( "a b" int(11) DEFAULT NULL )
You can use '[' in identifiers. If you want to use ']' in identifiers you have to specify it twice.
See also
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.