This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-23. For the latest, interactive version please visit https://mariadb.com/kb/.

SQL_MODE=MSSQL

Migrating from SQL Server? Contact the MariaDB migration experts!

  Contact Us

SET SQL_MODE=MSSQL implies all the following sql_mode flags:

Setting the sql_mode system variable to MSSQL allows the server to understand a small subset of Microsoft SQL Server's language. For the moment MSSQL mode only has limited functionality, but we plan to add more later 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

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.