Updated on 2025-10-23 GMT+08:00

Overview of Other Syntax

In addition to DCL, DDL, and DML syntax, M compatibility also provides syntax for other functions.

Showing an Execution Plan of an SQL Statement

M compatibility provides statements for showing an execution plan of an SQL statement. For details, see EXPLAIN.

Creating a Prepared Statement

M compatibility provides statements for creating a prepared statement. For details, see PREPARE.

Prepared Statements

Table 1 SQL statements related to prepared statements

Function

SQL Statement

Executing a prepared statement

EXECUTE

Deallocating a prepared statement

DEALLOCATE and DROP PREPARE

SQL Statements Related to Transactions

Table 2 SQL statements related to transactions

Function

SQL Statement

Rolling back the current transaction and canceling the changes in the transaction

ROLLBACK

Starting a transaction

BEGIN

SET TRANSACTION

START TRANSACTION

Committing the current transaction

COMMIT

Deleting a savepoint previously defined for the current transaction

RELEASE SAVEPOINT

Rolling back to a savepoint

ROLLBACK TO SAVEPOINT

Creating a savepoint in the current transaction

SAVEPOINT

Modifying, Displaying, and Restoring a GUC Parameter

Table 3 SQL statements for modifying, displaying, and restoring a GUC parameter

Function

SQL Statement

Modifying a GUC parameter

SET

Showing the current value of a GUC parameter

SHOW

Restoring a GUC parameter to the default value

RESET

Setting a User Identifier

Table 4 SQL statements for setting a user identifier

Function

SQL Statement

Setting the current user identifier of the current session

SET ROLE

Setting the session user identifier and the current user identifier of the current session to a specified user

SET SESSION AUTHORIZATION