Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-19142

sql_mode=MSSQL: Bracket identifiers

    XMLWordPrintable

    Details

      Description

      SQL Server understands bracket identifiers (in addition to the SQL Standard double-quoted identifiers), so these scripts are equivalent:

      SELECT
        [column]
      FROM
        [my table]
      WHERE
        [order] = 10;
      

      SELECT
        "column"
      FROM
        "my table"
      WHERE
        "order" = 10;
      

      We'll extend the parser to understand bracket identifiers when sql_mode has the MSSQL flag.

      Bracket identifiers will be accepted in all contexts where double-quoted identifiers are possible, including but not limited to:

      • Direct SQL
      • Dynamic SQL (PREPARE/EXECUTE/EXECUTE IMMEDIATE)
      • Stored procedures

      This will help SQL Server users to migrate to MariaDB easier.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: