This section describes the preference options that apply to general-purpose editors (see the figure that follows).
SQL Parsing in Code Editors
SQL properties that can be set include the
SQL_MODE, case-sensitivity of identifiers, and
the SQL delimiter used.
Default SQL_MODE for syntax checker: [
Optionally configure the SQL_MODE for the SQL editor's SQL syntax checker.
The document property
SQL_MODEfor all operations affecting SQL parsing at the document scope. The purpose of this option is to preserve the consistency of SQL statements within the document.
The property has the following functions:
SQL_MODEDBMS session variable to the value stored in the
SqlModeproperty of the document when performing reverse engineering, forward engineering, or synchronization operations.
SQL_MODEvalues defined in
SqlModeso that SQL parsing is correct.
Only a subset of all possible
SQL_MODEvalues affect the MySQL Workbench SQL parser. These values are:
PIPES_AS_CONCAT. Other values do not affect the MySQL Workbench SQL parser and are ignored.
If the value of
SqlModeis not set, the default value of the
SQL_MODEsession variable defined by the server stays unchanged during operations with the server. However, the MySQL Workbench SQL parser behaves as if
SQL_MODEis also not set. This may potentially lead to inconsistencies in parsing of SQL statements stored in the document. If you choose to not set the
SqlModeproperty, ensure that the default
SQL_MODEvariable defined by the server does not contain any values from the following list:
SqlModeproperty is defined in two locations: globally and at document scope. MySQL Workbench uses the global property to initialize the document property for each new document created. For each document, the property value defined at document scope always has higher priority over the one defined globally.
SQL Identifiers are Case Sensitive: Enabled by default. Whether to treat identifiers separately if their names differ only in letter case.
Non-Standard SQL Delimiter: [
$$]. Define the SQL statement delimiter to be different from the normally used delimiter (such as the
;character). Change this value if the delimiter you normally use, specifically in stored routines, happens to be the current setting.
Tab key inserts spaces instead of tabs
Indent width: [
4] How many spaces to insert when indenting with the tab key.
The number of spaces inserted after pressing the Tab key -- this assumes that the Tab key inserts spaces instead of tabs option is enabled.
Tab width: [
4] How many spaces wide are tab characters.
The number of spaces defined for tab characters within MySQL Workbench.