dynamic SQL

When should we use dynamic SQL

When Should We Use Dynamic SQL?

A comparison between static SQL vs dynamic SQL shows us pretty clearly that, if there exists a choice, we are better off choosing static SQL. So, when should we use dynamic SQL?

Read the Full Article →
Static SQL vs Dynamic SQL

Static SQL vs Dynamic SQL: Which to use?

Some questions do not have definitive answers. "Is a full table scan bad? Should this design be denormalized? Will partitioning this table help?" The answers vary widely depending on the specifics on the problem. Fortunately, "Should I use static SQL or dynamic SQL?" is not one of those questions.

Read the Full Article →
Check if an Element Exists in a Collection

The Smart Way to Check if an Element Exists in a Collection

When you need to find out if a specific element exists in a collection or not, how do you go about it? Do you loop through the list till you find the value? If that’s what you do, this post is for you.

Read the Full Article →
Oracle schema record count

Find Number of Rows in Each Table in a Schema

How will you find out the number of rows in each table in a schema in Oracle? Here are two approaches with their pros and cons.

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. There is no direct way to do this: But I have a simple workaround to share with you. This article gives you a script to restart a sequence, explains how it works and shows you a test run with a sample sequence.

Read the Full Article →