DDL

Data definition language (DDL) commands define and maintain data structures in the database. For example, commands for creating tables, modifying packages, dropping constraints.

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 Unique Constraint vs Unique Index in Oracle

Unique Constraint vs Unique Index in Oracle

Unique constraints and unique indexes, on the surface, seem very alike. Dig deeper, and you will see that they differ. Let’s see how.

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 →
When should we use dynamic SQL

When Should We Use Dynamic SQL?

We know that, if there exists a choice between static SQL vs dynamic SQL, static SQL is the way to go. In that case, why and when should we use dynamic SQL?

Read the Full Article →
Thumbnail image for Oracle Partitioning: Range Interval Partitioning

Oracle Partitioning: Range Interval Partitioning

Create Oracle table partitions on-the-fly using range interval partitioning, a beautiful Oracle partitioning feature that obviates the need to pre-create database table partitions.

Read the Full Article →
Thumbnail image for ORA-01450: Maximum Key Length Exceeded – Possible Causes and Fix

ORA-01450: Maximum Key Length Exceeded – Possible Causes and Fix

“ORA-01450 maximum key length (6398) exceeded” might occur when a table index is being created in the Oracle database. Possible reasons why this error shows up and how to fix it.

Read the Full Article →
Thumbnail image for Replace Duplicates in ID Column with Unique Values

Replace Duplicates in ID Column with Unique Values

A solution to the requirement of replacing only the duplicate IDs with unique values in a database table, and letting everything else stay untouched.

Read the Full Article →
Thumbnail image for How to Cast PLSQL Function Output as View

How to Cast PLSQL Function Output as View

How to cast PLSQL function output as view, when a single SQL statement is not sufficient to get the result you want.

Read the Full Article →
Thumbnail image for Stop Overlapping Ranges in a Table

Stop Overlapping Ranges in a Table

Overlapping Ranges Blocker Toolkit: trigger-based solution to prevent overlapping ranges of data in an Oracle master table that stores range-based data, such as income tax brackets or sales commission rates.

Read the Full Article →
Thumbnail image for ORA-55610: Invalid DDL statement on history-tracked table

ORA-55610: Invalid DDL statement on history-tracked table

If Oracle Total Recall is enabled on a table and want to truncate or drop the table, you are in for a problem: error “ORA-55610: Invalid DDL statement on history-tracked table”. How to work around this error.

Read the Full Article →