Sequences

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 →
MERGE Statement in Oracle

MERGE: Insert New Rows, Update Existing Rows in One Shot

MERGE in Oracle combines the power of INSERT and UPDATE into one power-packed statement

Read the Full Article →
Reset a Sequence in Oracle

How to Reset a Sequence in Oracle

Oracle does not a have ready-made command to restart a sequence. But with this simple workaround, you can reset a sequence in Oracle.

Read the Full Article →
Auto-Increment Column

What’s the value of auto-increment column in this insert?

In the last post, we saw a neat way to implement auto-increment functionality in an Oracle table. The auto-incremented column gets its value populated in the background, without the issuer of the insert statement even getting to know about it. BUT – what if the issuer of the insert statement does want to know about […]

Read the Full Article →
Auto-Increment Columns: FAQ

Auto-Increment Columns: FAQ

What is an auto-increment column? A table column of which the value increments automatically each time a row is inserted into the table. What is the use of auto-increment columns? This column usually serves as the primary key or unique identifier for each row of the table. Since the value automatically increments with each insert, […]

Read the Full Article →