Back to Yugabyte Db

SQL feature support

docs/content/v2024.2/api/ysql/sql-feature-support.md

2026.1.0.0-b2518.0 KB
Original Source

YugabyteDB is a distributed SQL database that implements many standard SQL features while introducing some unique capabilities due to its distributed nature. The following provides an overview of SQL features that are fully supported, partially supported, and features that are currently work in progress. Whether you're designing new applications or migrating existing workloads, this guide will help you understand how YugabyteDB's SQL capabilities compare to other SQL-based systems, ensuring smooth adoption and development.

Data types

Data typeDocumentation
{{<icon/yes>}}ARRAYArray data types
{{<icon/yes>}}BINARYBinary data types
{{<icon/yes>}}BIT,BYTES
{{<icon/yes>}}BOOLEANBoolean data types
{{<icon/yes>}}CHAR, VARCHAR, TEXTCharacter data types
{{<icon/yes>}}COLLATECollations
{{<icon/yes>}}DATE, TIME, TIMESTAMP, INTERVALDate and time data types
{{<icon/yes>}}DEC, DECIMAL, NUMERICFixed point numbers
{{<icon/yes>}}ENUMEnumerations
{{<icon/yes>}}FLOAT, REAL, DOUBLE PRECISIONFloating-point numbers
{{<icon/yes>}}JSON, JSONBJSON data types
{{<icon/yes>}}MONEYMoney data types
{{<icon/yes>}}SERIAL, SMALLSERIAL, BIGSERIALSerial data types
{{<icon/yes>}}SMALLINT, INT, INTEGER, BIGINTIntegers
{{<icon/yes>}}INT4RANGE, INT8RANGE, NUMRANGE, TSRANGE, TSTZRANGE, DATERANGERange data types
{{<icon/yes>}}UUIDUUID data type
{{<icon/no>}}XML
{{<icon/yes>}}TSVECTOR
{{<icon/yes>}}UDT(Base, Enumerated, Range, Composite, Array, Domain types)
{.sno-1}

Schema operations

OperationDocumentation
{{<icon/partial>}}Altering tablesALTER TABLE
{{<icon/yes>}}Altering databasesALTER DATABASE
{{<icon/yes>}}Altering a column's name
{{<icon/yes>}}Altering a column's default value
{{<icon/partial>}}Altering a column's data type
{{<icon/yes>}}Adding columnsADD COLUMN
{{<icon/yes>}}Removing columnsDROP COLUMN
{{<icon/yes>}}Adding constraintsADD CONSTRAINT
{{<icon/yes>}}Removing constraintsDROP CONSTRAINT
{{<icon/no>}}Altering indexes
{{<icon/yes>}}Adding indexesCREATE INDEX
{{<icon/yes>}}Removing indexes
{{<icon/yes>}}Adding a primary key
{{<icon/yes>}}Dropping a primary key
{{<icon/no>}}Altering a primary key
{{<icon/yes>}}Adding user-defined schemasCREATE SCHEMA
{{<icon/no>}}Removing user-defined schemas
{{<icon/no>}}Altering user-defined schemas
{.sno-1}

Constraints

FeatureDocumentation
{{<icon/yes>}}CheckCheck constraint
{{<icon/yes>}}UniqueUnique constraint
{{<icon/yes>}}Not NullNot Null constraint
{{<icon/yes>}}Primary KeyPrimary keys
{{<icon/yes>}}Foreign KeyForeign keys
{{<icon/partial>}}Default Value
{{<icon/partial>}}Deferrable Foreign Key constraints
{{<icon/no>}}Deferrable Primary Key and Unique constraints
{{<icon/no>}}Exclusion constraints
{.sno-1}

Indexes

ComponentDocumentation
{{<icon/yes>}}IndexesIndexes and constraints
{{<icon/yes>}}GIN indexesGIN indexes
{{<icon/yes>}}Partial indexesPartial indexes
{{<icon/yes>}}Expression indexesExpression indexes
{{<icon/yes>}}Multi-column indexesMulti-column indexes
{{<icon/yes>}}Covering indexesCovering indexes
{{<icon/no>}}GiST indexes
{{<icon/no>}}BRIN indexes
{{<icon/yes>}}B-tree indexesB-tree index is treated as an LSM index.
{.sno-1}

Transactions

FeatureDocumentation
{{<icon/yes>}}TransactionsTransactions
{{<icon/yes>}}BEGINBEGIN
{{<icon/yes>}}COMMITCOMMIT
{{<icon/yes>}}ROLLBACKROLLBACK
{{<icon/yes>}}SAVEPOINTSAVEPOINT
{{<icon/yes>}}ROLLBACK TO SAVEPOINTROLLBACK TO SAVEPOINT
{{<icon/no>}}PREPARE TRANSACTION (XA)
{.sno-1}

Roles and Permissions

ComponentDetails
{{<icon/yes>}}UsersManage users and roles
{{<icon/yes>}}RolesManage users and roles
{{<icon/yes>}}Object ownership
{{<icon/yes>}}PrivilegesGrant privileges
{{<icon/yes>}}Default privileges
{{<icon/yes>}}Row level security
{{<icon/yes>}}Column level security
{.sno-1}

Queries

ComponentDetails
{{<icon/yes>}}FROM, WHERE, GROUP BY, HAVING, DISTINCT, LIMIT/OFFSET, WITH queriesGroup data
{{<icon/yes>}}EXPLAIN query plansAnalyze queries with EXPLAIN
{{<icon/yes>}}JOINs (INNER/OUTER, LEFT/RIGHT)Join columns
{{<icon/yes>}}Expressions and OperatorsExpressions and operators
{{<icon/yes>}}Common Table Expressions (CTE) and Recursive QueriesRecursive queries and CTEs
{{<icon/yes>}}Upserts (INSERT ... ON CONFLICT DO NOTHING/UPDATE)Upsert
{.sno-1}

Advanced SQL

ComponentDetails
{{<icon/yes>}}Stored proceduresStored procedures
{{<icon/yes>}}User-defined functionsFunctions
{{<icon/yes>}}CursorsCursors
{{<icon/yes>}}Row-level triggers (BEFORE, AFTER, INSTEAD OF)
{{<icon/yes>}}Statement-level triggers (BEFORE, AFTER, INSTEAD OF)
{{<icon/no>}}Deferrable triggers
{{<icon/no>}}Transition tables (REFERENCING clause for triggers)
{{<icon/yes>}}SequencesAuto-Increment column values
{{<icon/yes>}}Identity columns
{{<icon/yes>}}ViewsViews
{{<icon/yes>}}Materialized viewsMaterialized views
{{<icon/yes>}}Window functionsWindow functions
{{<icon/yes>}}Common table expressions
{{<icon/yes>}}ExtensionsPostgreSQL extensions
{{<icon/yes>}}Foreign data wrappersForeign data wrappers
{.sno-1}