Updated on 2024-05-14 GMT+08:00

DCL

No.

Introduction

Syntax Description

Difference

1

Set user-defined variables.

SET

  • Difference in the length of a user-defined variable. For example:
    • There is no restriction on the length of MySQL user-defined variable names.
    • The length of a user-defined GaussDB variable name cannot exceed 64 bytes. If the length exceeds 64 bytes, the excess part will be truncated and an alarm will be generated.

2

Compatible with the SET TRANSACTION syntax.

SET TRANSACTION

In MySQL, you can set the transaction isolation level and read/write mode for the current session and global. In GaussDB, you need to set the b_format_behavior_compat_options parameter to include set_session_transaction for the current session. The global setting takes effect only for the current database.

3

Set names with COLLATE specified.

SET [ SESSION | LOCAL ] NAMES {'charset_name' [COLLATE 'collation_name'] | DEFAULT};

GaussDB does not allow charset_name to be different from the database character set. For details, see "SQL Reference > SQL Syntax > S > SET" in Developer Guide.