SQL Statements¶
This page lists common SQL statements for MatrixOne instances by category. It is a categorized index, not a complete grammar for every statement. The console’s Permissions · MatrixOne settings and instance capabilities determine whether you can execute a statement.
DDL (data definition)¶
Defines or changes databases, tables, indexes, views, and MatrixOne extension objects.
Category |
Statements (summary) |
|---|---|
Create |
|
Alter |
|
Drop |
|
Truncate |
|
Restore |
|
Product-oriented descriptions of extension objects:
Stage: An abstraction for an external storage location, commonly used with
LOAD DATAand file-listing functions.Publication / Subscription: Publishes and subscribes to data across instances.
Snapshot / PiTR: Capabilities related to backup and point-in-time recovery.
External / Dynamic table: External and dynamic tables, subject to availability in the instance version.
DML (data manipulation)¶
Statement |
Purpose |
|---|---|
|
Inserts rows |
|
Ignores a conflict or updates on conflict |
|
Replaces rows |
|
Updates existing rows |
|
Deletes rows |
|
Bulk loading. See the syntax subset in Limitations. |
DQL (data query)¶
Centered on SELECT:
Capability |
Key points |
|---|---|
Single table / projection / filtering / aggregation |
|
Joins |
|
Subqueries |
|
CTE |
|
Set operations |
|
TCL (transactions)¶
Statement |
Purpose |
|---|---|
|
Starts a transaction |
|
Commits |
|
Rolls back |
|
Controls automatic commits |
DCL (data control)¶
Use with Privilege Categories and Permissions · MatrixOne:
Statement |
Purpose |
|---|---|
|
Users |
|
Roles |
|
Grants and revokes privileges |
Other administrative statements¶
Category |
Examples |
|---|---|
Switch context |
|
|
|
|
Sets session or global variables, uses |
Prepared statements |
|
Plans |
|
Sessions |
|
Relationship to platform features¶
Business scenario |
Common statement categories |
|---|---|
Creating tables and querying data in Catalog |
DDL + DQL + DML |
Sharing data across instances |
Publication / Subscription DDL and |
Backup and recovery |
Snapshot / PiTR DDL |
Vector search |
|
Privilege governance within an instance |
DCL + |