SQL

SQL (Structured Query Language) is a standard language used to operate relational databases. It includes operations such as database creation, retrieving and modifying data, granting privileges to data.

Thumbnail image for Find Which Objects are INVALID in Oracle – and Why

Find Which Objects are INVALID in Oracle – and Why

Oracle objects become invalid when a dependency chain is broken. Here’s how to find invalid Oracle objects and how to make them valid again.

Read the Full Article →
Thumbnail image for Pagination Queries in Oracle: Analytics, Row Limiting Clause

Pagination Queries in Oracle: Analytics, Row Limiting Clause

How to implement pagination queries in Oracle, using (1) analytic functions (2) Oracle’s row limiting clause to fetch N rows from a given offset.

Read the Full Article →
Thumbnail image for Conditional Unique Index on Multiple Columns

Conditional Unique Index on Multiple Columns

Oracle’s function-based indexes can be used to build conditional uniqueness on table columns. Here’s a working example of a conditional unique index on multiple columns.

Read the Full Article →
Thumbnail image for REGEX to Split a Comma-Separated String into Rows

REGEX to Split a Comma-Separated String into Rows

How to split a comma-separated string into rows in Oracle SQL, using regex function REGEX_SUBSTR and recursion via CONNECT BY.

Read the Full Article →
Thumbnail image for JSON_TABLE Options: Error Handling, Nested Path

JSON_TABLE Options: Error Handling, Nested Path

Options that can be used with JSON_TABLE query operator to select JSON data as relational rows and columns: ERROR ON ERROR, FOR ORDINALITY, NESTED PATH etc.

Read the Full Article →
Thumbnail image for JSON Conditionals: JSON_EXISTS, JSON_TEXTCONTAINS

JSON Conditionals: JSON_EXISTS, JSON_TEXTCONTAINS

Implement true/false tests on JSON documents in Oracle database 12c using JSON conditional logic: JSON_EXISTS and JSON_TEXTCONTAINS.

Read the Full Article →
Thumbnail image for Querying JSON Data in Oracle: SQL/JSON Query Functions, Dot Notation

Querying JSON Data in Oracle: SQL/JSON Query Functions, Dot Notation

Querying JSON data in Oracle 12c using various query approaches: simple SQL, SQL/JSON functions (JSON_QUERY, JSON_VALUE, JSON_TABLE), dot-notation syntax.

Read the Full Article →
SQL XML in Oracle: Generating XML from Relational Data

Generating XML from Relational Data using Oracle SQL/XML

How to generate XML from relational data using a combination of Oracle SQL/XML functions such as XMLELEMENT, XMLATTRIBUTES, XMLFOREST, XMLAGG, XMLSERIALIZE.

Read the Full Article →
Thumbnail image for SQL: Compare Two Tables for Differences in Data

SQL: Compare Two Tables for Differences in Data

How to compare two tables that share the same structure, to identify data differences between the two tables: missing rows, extra rows, or mismatch in attribute values.

Read the Full Article →
Convert VARCHAR2 to DATE

DATE Format SQL for Dates Stored as Strings

Convert VARCHAR2 to DATE with appropriate format masks, for comparing two dates stored as strings with different DATE formats in the database.

Read the Full Article →