We saw in another article how to build an array from an SQL query (from each row, or from a column). This article shows how to loop over an array items.
Db2 ordinary arrays can be constructed and populated from an SQL query. Let’s see how to do it.
Db2 supports the
IDENTITY keyword to create autoincremental columns. Several options are available.
Simple examples of SQL stored procedures in Db2.
Db2 supports three different hash functions, and each of them can use different algorithms. Let’s shred some light on them to understand their use cases.
Let’s see how to preserve, empty or drop temporary tables when a transaction succeeds (
COMMIT) or fails (
Let’s see how to create, modify and use an alias in Db2. An alias can refer to a table, a sequence or a module. Aliases exist in several databases, but we’re focusing on Db2 syntax here.
Why and how to write comments on database, tables, and other objects on most DBMSs. How to read comments.
How to create a copy of a table. The copy can contain data, a selective portion of the data, or it can be empty.
There is some confusion about the
FOR EACH, the
MODE, and the
AFTER clauses of Db2
CREATE TRIGGER. While other clauses are common to most DBMSs,
MODE is a Db2 unique feature. Their meaning is simpler than it seems.