Supported Statements

Data manipulation statements

Statement
Supported
Notes and limitations

CALL

βœ…

CREATE TABLE AS

βœ…

CREATE TABLE LIKE

βœ…

DO

❌

DELETE

βœ…

No support for referring to more than one table in a single DELETE statement.

HANDLER

❌

IMPORT TABLE

❌

Use dolt table import

INSERT

βœ…

Including support for ON DUPLICATE KEY clauses.

LOAD DATA

βœ…

LOAD XML

❌

Use dolt table import

REPLACE

βœ…

SELECT

βœ…

Most select statements, including UNION and JOIN, are supported.

SELECT FROM AS OF

βœ…

Selecting from a table as of any known revision or commit timestamp is supported.

SELECT FOR UPDATE

❌

Row-level locks are not supported.

SUBQUERIES

βœ…

Subqueries work, but must be given aliases. Some limitations apply.

TABLE

βœ…

TRUNCATE

βœ…

UPDATE

βœ…

No support for referring to more than one table in a single UPDATE statement.

VALUES

βœ…

WITH

βœ…

SELECT INTO

βœ…

Charset/Collation specification not supported.

Data definition statements

Statement
Supported
Notes and limitations

ADD COLUMN

βœ…

ADD CHECK

βœ…

ADD CONSTRAINT

βœ…

ADD FOREIGN KEY

βœ…

ADD PARTITION

❌

ALTER COLUMN

🟠

Name and order changes are supported. Some but not all type changes are supported.

ALTER DATABASE

❌

ALTER EVENT

βœ…

Moving events across databases using RENAME TO clause is not supported yet.

ALTER INDEX

❌

Indexes can be created and dropped, but not altered.

ALTER PRIMARY KEY

βœ…

ALTER TABLE

βœ…

Not all ALTER TABLE statements are supported. See the rest of this table for details.

ALTER TYPE

🟠

Some type changes are supported but not all.

ALTER VIEW

❌

Views can be created and dropped, but not altered.

CHANGE COLUMN

βœ…

CREATE DATABASE

βœ…

Creates a new dolt database rooted relative to the server directory

CREATE EVENT

βœ…

CREATE FUNCTION

❌

CREATE INDEX

βœ…

CREATE SCHEMA

βœ…

Creates a new dolt database rooted relative to the server directory

CREATE TABLE

βœ…

CREATE TABLE AS

βœ…

CREATE TRIGGER

βœ…

CREATE VIEW

βœ…

DESCRIBE TABLE

βœ…

DROP COLUMN

βœ…

DROP CONSTRAINT

βœ…

DROP DATABASE

βœ…

Deletes the dolt data directory. This is unrecoverable.

DROP EVENT

βœ…

DROP FUNCTION

❌

DROP INDEX

βœ…

DROP SCHEMA

βœ…

Deletes the dolt data directory. This is unrecoverable.

DROP TABLE

βœ…

DROP PARTITION

❌

DROP PROCEDURE

βœ…

DROP TRIGGER

βœ…

DROP VIEW

βœ…

MODIFY COLUMN

βœ…

RENAME COLUMN

βœ…

RENAME CONSTRAINT

❌

RENAME DATABASE

❌

Database names are read-only, but can be configured in the server config.

RENAME INDEX

❌

RENAME TABLE

βœ…

SHOW COLUMNS

βœ…

SHOW CONSTRAINTS

❌

SHOW CREATE FUNCTION

❌

SHOW CREATE PROCEDURE

βœ…

SHOW CREATE TABLE

βœ…

SHOW CREATE VIEW

βœ…

SHOW DATABASES

βœ…

SHOW FUNCTION CODE

❌

SHOW FUNCTION STATUS

❌

SHOW GRANTS

🟠

Database privileges, table privileges, and role assumption are not yet implemented.

SHOW INDEX

❌

SHOW PRIVILEGES

βœ…

SHOW PROCEDURE CODE

❌

SHOW PROCEDURE STATUS

βœ…

SHOW SCHEMAS

βœ…

SHOW TABLES

βœ…

SHOW FULL TABLES reveals whether a table is a base table or a view.

TRUNCATE TABLE

βœ…

Transactional statements

Dolt supports atomic transactions like other SQL databases. It's also possible for clients to connect to different heads, which means they will never see each other's edits until a merge between heads is performed. See Using Branches for more detail.

Dolt has two levels of persistence:

  1. The SQL transaction layer, where a COMMIT statement atomically updates the working set for the connected head

  2. The Dolt commit layer, where commits are added to the Dolt commit graph with an author, a parent commit, etc.

Statement
Supported
Notes and limitations

BEGIN

βœ…

Synonym for START TRANSACTION

COMMIT

βœ…

CALL DOLT_COMMIT()

βœ…

DOLT_COMMIT() creates a new Dolt commit using the content of the STAGED HEAD. See docs on DOLT_COMMIT() for details.

LOCK TABLES

❌

LOCK TABLES parses correctly but does not prevent access to those tables from other sessions.

ROLLBACK

βœ…

SAVEPOINT

βœ…

RELEASE SAVEPOINT

βœ…

ROLLBACK TO SAVEPOINT

βœ…

@@autocommit

βœ…

SET TRANSACTION

❌

Different isolation levels are not yet supported.

START TRANSACTION

βœ…

UNLOCK TABLES

🟠

UNLOCK TABLES parses correctly, but since LOCK TABLES doesn't prevent concurrent access it's essentially a no-op.

Prepared statements

Statement
Supported
Notes and limitations

PREPARE

βœ…

Prepared statements do not work inside of a STORED PROCEDURE.

EXECUTE

βœ…

Execute statments do not work inside of a STORED PROCEDURE.

Access management statements

More information on how Dolt handles access management may be found in the access management page.

Statement
Supported
Notes and limitations

ALTER USER

❌

CREATE ROLE

βœ…

CREATE USER

🟠

Only supports basic user creation with an optional password

DROP ROLE

βœ…

DROP USER

βœ…

GRANT

🟠

Only handles static privileges down to the table level

RENAME USER

❌

REVOKE

🟠

Only handles static privileges down to the table level

SET DEFAULT ROLE

❌

SET PASSWORD

❌

SET ROLE

❌

Session management statements

Statement
Supported
Notes and limitations

SET

βœ…

SET CHARACTER SET

βœ…

SET NAMES

βœ…

KILL QUERY

βœ…

Utility statements

Statement
Supported
Notes and limitations

EXPLAIN

βœ…

USE

βœ…

Compound statements

Statement
Supported
Notes and limitations

BEGIN END

βœ…

STATEMENT LABELS

🟠

Labels are only supported for LOOP.

DECLARE

βœ…

Fully supports declaring variables.

DECLARE ... CONDITION

βœ…

DECLARE ... HANDLER

🟠

Partially supports handling the NOT FOUND condition when using cursors.

DECLARE ... CURSOR

βœ…

SET

βœ…

CASE

βœ…

IF

βœ…

ITERATE

βœ…

LEAVE

βœ…

LOOP

βœ…

REPEAT

βœ…

RETURN

❌

WHILE

❌

CLOSE

βœ…

FETCH

βœ…

OPEN

βœ…

Other administrative statements

Statement
Supported
Notes and limitations

BINLOG

βœ…

Internal-use statement that replays base64-encoded binary log events. Generated by mysqlbinlog or similar utilities. Concurrent BINLOG statements can corrupt each other's states; execute through one client at a time only.

Last updated

Was this helpful?