tencent cloud

TDSQL Boundless

Release Notes
Product Introduction
Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
Usage specification recommendations
Kernel Features
Kernel Overview
Kernel Version Release Notes
Functionality Features
Performance Features
Billing
Billing Overview
Purchase Method
Pricing Details
Renewal
Overdue Payments
Refund
Getting Started
Creating an Instance
Connect to Instances
User Guide
Data Migration
Data Subscription
Instance Management
Parameter Configuration
Account Management
Security Group
Backup and Restoration
Database Auditing
Tag Management
Use Cases
Technical Evolution and Usage Practices of Online DDL
Lock Mechanism Analysis and Troubleshooting Practices
Data Intelligent Scheduling and Related Practices for Performance Optimization
TDSQL Boundless Selection Guide and Practical Tutorial
Developer Guide
Developer Guide (MySQL Compatibility Mode)
Developer Guide (HBase Compatibility Mode)
Performance Tuning
Performance Tuning Overview
SQL Tuning
DDL Tuning
Performance White Paper
Performance Overview
TPC-C Test
Sysbench Test
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Security Group APIs
Task APIs
Backup APIs
Rollback APIs
Parameter APIs
Database APIs
Data Types
Error Codes
General Reference
System Architecture
SQL Reference
Database Parameter Description
TPC-H benchmark data model reference
Error Code Information
Security and Compliance
FAQs
Agreements
Service Level Agreement
Terms of Service
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

sql_mode

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-03-27 17:51:58

Feature Description

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.

Attribute Description

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

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan