Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
Usage specification recommendations
sql_mode is used to set the SQL mode of the server. The SQL mode determines how the server handles certain features and behaviors of SQL statements, such as data type checking, null value handling, and string comparison.Required | Description |
Parameter Type | SET |
Default Value | {ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION} |
Value Range | REAL_AS_FLOAT: Treat the REAL data type as a FLOAT type rather than a DOUBLE type.PIPES_AS_CONCAT: Treat the pipe character (||) as a string concatenation operator rather than a logical OR operator.ANSI_QUOTES: Quote identifiers using ANSI standard quotation marks (double quotes) instead of the default backticks.IGNORE_SPACE: Ignore spaces around identifiers.ONLY_FULL_GROUP_BY: Require all non-aggregate columns in the GROUP BY clause to appear in the SELECT clause.NO_UNSIGNED_SUBTRACTION: Disable subtraction of unsigned integers.NO_DIR_IN_CREATE: Forbid using the DIRECTORY option in CREATE TABLE statements.ANSI: Enable ANSI compatibility mode. This mode combines multiple SQL standard-compliant options, including REAL_AS_FLOAT, PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, and ONLY_FULL_GROUP_BY, making TDSQL Boundless behave more closely to standard SQL.NO_AUTO_VALUE_ON_ZERO: Do not automatically generate an auto-increment value when data is inserted, if the value of the integer column is zero.NO_BACKSLASH_ESCAPES: Disable the backslash (\\) as an escape character.STRICT_TRANS_TABLES: Enable strict mode in transaction tables and require insertion, update and deletion operations to follow stricter rules.STRICT_ALL_TABLES: Enable all strict mode options, including STRICT_TRANS_TABLES.NO_ZERO_IN_DATE: Forbid using zero parts in dates, such as "2022-00-01".NO_ZERO_DATE: Forbid using zero date ('0000-00-00').ALLOW_INVALID_DATES: Allow inserting invalid dates, such as '2022-02-30'.ERROR_FOR_DIVISION_BY_ZERO: Raise an error during a division operation if the divisor is zero.TRADITIONAL: Enable traditional strict mode. This mode combines strict data validation options, including STRICT_TRANS_TABLES, STRICT_ALL_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, and NO_ENGINE_SUBSTITUTION, making TDSQL Boundless behave more strictly, similar to traditional database systems.HIGH_NOT_PRECEDENCE: Give the NOT operator high priority, equivalent to the priority of the AND and OR operators.NO_ENGINE_SUBSTITUTION: Raise an error if the designated storage engine is unavailable, rather than using the default storage engine.PAD_CHAR_TO_FULL_LENGTH: Pad the value of a CHAR type column to its defined length when data is inserted.TIME_TRUNCATE_FRACTIONAL: Enable the time fractional truncation mode. When the fractional part of a time type (TIME, DATETIME, TIMESTAMP) value exceeds the precision defined for the column, automatically truncate the extra fractional digits without generating warnings or errors. |
Effective Scope | GLOBAL SESSION |
Restart Required | No |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan