Supported Statements
Data manipulation statements
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
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:
The SQL transaction layer, where a
COMMITstatement atomically updates the working set for the connected headThe Dolt commit layer, where commits are added to the Dolt commit graph with an author, a parent commit, etc.
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
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.
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
SET
β
SET CHARACTER SET
β
SET NAMES
β
KILL QUERY
β
Utility statements
EXPLAIN
β
USE
β
Compound statements
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
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?