Shorthand operators for navigating JSON document structure. -> extracts a JSON value; ->> extracts a text (unquoted) value. Availability and exact semantics vary significantly by engine.
PostgreSQL operators for querying JSONB: arrow for int/object access, arrow-arrow for text extraction, at-greater for containment, question-mark for key existence. Combined with GIN indexes, these enable powerful indexed JSON querying.
| Database System | Support Status | Since Version | Notes |
|---|---|---|---|
| MySQL | ✓ Supported | 5.7.8 | col->'$.path' is shorthand for JSON_EXTRACT(col, '$.path') and returns a JSON-encoded value (strings include surrounding quotes). col->>'$.path' is shorthand for JSON_UNQUOTE(JSON_EXTRACT(col, '$.path')) and returns unquoted text. Path expressions must include the $ root prefix. |
| PostgreSQL | ✓ Supported | 9.3 | Richest operator set of any engine. -> extracts a JSON/JSONB value by key (or array index). ->> extracts as text. #> extracts by path array (JSON result); #>> extracts by path array (text result). jsonb columns additionally support @> (contains), <@ (contained by), ? (key exists), ?| (any key exists), ?& (all keys exist) — all indexable with GIN. The json type supports -> and ->> but not the containment operators. |
| SQL Server | ✗ Not Supported | — | No -> or ->> operators. All JSON access is through functions: JSON_VALUE() for scalars and JSON_QUERY() for objects/arrays. Path expressions are string arguments to functions, not operators. There is no operator-based path syntax. |
| Oracle | ✗ Not Supported | — | No -> or ->> operators in standard SQL access. All access uses JSON_VALUE() and JSON_QUERY() functions with path string arguments. Oracle 21c introduced a native JSON data type with dot-notation access (col.key.subkey), but this only applies to columns declared as JSON type, not VARCHAR2/CLOB with JSON content. |
| SQLite | ✓ Supported | 3.38.0 | -> and ->> operators added in SQLite 3.38.0 (2022-02-22). SQLite's ->> always returns an SQL value (text, integer, real, or NULL) — it never returns a JSON-encoded string, which differs from MySQL's -> behavior. For SQLite < 3.38.0, use json_extract() exclusively. |
PostgreSQL has the most complete operator set: ->, ->>, #>, #>> for extraction plus @>, <@, ?, ?|, ?& for containment and key existence on jsonb (all GIN-indexable). MySQL and SQLite share -> / ->> but with a key difference: MySQL's ->> returns JSON_UNQUOTE output (text) while SQLite's ->> returns a native SQL type directly. SQL Server and Oracle have no operators at all — only functions. Note that MySQL's path expressions require the $ prefix (data->>'$.name') while PostgreSQL's do not (data->>'name').
col->'$.path' is shorthand for JSON_EXTRACT(col, '$.path') and returns a JSON-encoded value (strings include surrounding quotes). col->>'$.path' is shorthand for JSON_UNQUOTE(JSON_EXTRACT(col, '$.path')) and returns unquoted text. Path expressions must include the $ root prefix.
Richest operator set of any engine. -> extracts a JSON/JSONB value by key (or array index). ->> extracts as text. #> extracts by path array (JSON result); #>> extracts by path array (text result). jsonb columns additionally support @> (contains), <@ (contained by), ? (key exists), ?| (any key exists), ?& (all keys exist) — all indexable with GIN. The json type supports -> and ->> but not the containment operators.
No -> or ->> operators. All JSON access is through functions: JSON_VALUE() for scalars and JSON_QUERY() for objects/arrays. Path expressions are string arguments to functions, not operators. There is no operator-based path syntax.
No -> or ->> operators in standard SQL access. All access uses JSON_VALUE() and JSON_QUERY() functions with path string arguments. Oracle 21c introduced a native JSON data type with dot-notation access (col.key.subkey), but this only applies to columns declared as JSON type, not VARCHAR2/CLOB with JSON content.
-> and ->> operators added in SQLite 3.38.0 (2022-02-22). SQLite's ->> always returns an SQL value (text, integer, real, or NULL) — it never returns a JSON-encoded string, which differs from MySQL's -> behavior. For SQLite < 3.38.0, use json_extract() exclusively.