DBMS_UTILITY.COMMA_TO_TABLE
The DBMS_UTILITY package provides various utility subprograms. One such useful utility is COMMA_TO_TABLE procedure, which converts a comma-delimited list of names into a PL/SQL table of names. Let’s...
View ArticleQuoting string literal technique to avoid errors due to single-quotation...
I have seen many questions on the Oracle forums on how to avoid the error due to single-quotation marks in the string literal. One such question was...
View ArticleFlashback DML changes on a table after COMMIT
I see frequent questions regarding “How to Rollback database changes after commit” or “How to flashback my table to previous state”. One such questions was asked here...
View ArticleVarying IN list of values in WHERE clause
One of the frequent question on Oracle forums is about the Varying IN list in WHERE clause. One such question was asked here...
View ArticleSQL to Search for a VALUE in all COLUMNS of all TABLES in an entire SCHEMA
One of the tricky questions asked in almost all the Oracle forums “How to search for a VALUE in all COLUMNS of all TABLES in an entire SCHEMA”. One such question is asked in Stack Overflow...
View ArticleAuto-increment primary key in Pre 12c releases (Identity functionality)
Oracle 12c has introduced the IDENTITY COLUMN functionality which provides an automatic functionality of a trigger-sequence approach for populating the primary key of a table. However, for Pre 12c...
View ArticleIDENTITY column autoincrement functionality in Oracle 12c
Oracle 12c has introduced the IDENTITY column which is the automatic method over the old trigger-sequence based approach to auto-populate the primary key of a table. In my previous post, Auto-increment...
View ArticleWhy *_PROCEDURES view doesn’t show the PROCEDURE_NAME
Recently I saw a question in Stack Overflow “Unable to find procedure in DBA_PROCEDURES view“. Similar questions are: Why can’t I see my procedure in user_procedures view? Why is the procedure_name...
View ArticleSplit comma delimited strings in a table in Oracle
NOTE : This post is about splitting multiple comma delimited column values in a table. If you have to apply it on a single value then look at Split single comma delimited string into rows in Oracle In...
View ArticlePerformance difference between Explicit and Implicit Cursors in Oracle PL/SQL
There are many articles over the web about the difference between an explicit and implicit cursor. Theoretically, an implicit cursor is nicer and way faster. For an implicit cursor, Oracle takes care...
View ArticleWhy DELETE takes longer than INSERT
There was a question on Stack Overflow why does delete take longer than insert. The question is too broad to be addressed as there could be many reasons and statistics behind the two operations....
View ArticleReturning the sequence number of Identity column after Insert
One of the frequently asked questions about sequences is “How to return the last sequence inserted?” Now, with the introduction of Identity column, I saw a similar question in Stack Overflow, Returning...
View ArticleReverse the order of comma separated string using Oracle SQL
There was a question on Stack Overflow about “Oracle:how to reverse the string ‘ab,cd,ef’ to ‘ef->cd->ab’” Now, the question might look straight forward to simply reverse the string. However, it...
View ArticleGenerate Date, Month Name, Week Number, Day number between two dates in...
This is a frequently asked question in most of the forums. Recently saw such question in Stack Overflow Generate Month Name, Day name, Week number and Day number between two dates. Typical questions...
View ArticleWhy not use WM_CONCAT function in Oracle?
String aggregation related questions are frequently asked questions and every now and then someone provides a solution using WM_CONCAT function. And it really annoys me to repeat the same thing every...
View ArticleUTL_MATCH string comparision technique in Oracle
The UTL_MATCH package facilitates matching two records. It comes very handy for data entry validation and string matching. Setup DROP TABLE t_utl_match; CREATE TABLE t_utl_match ( id NUMBER, col1...
View ArticleFind range of consecutive values in a sequence of numbers or dates
One of the frequently asked questions is about Gaps and Islands problems which involve finding a range of missing values (gaps) or a range of consecutive values (islands) in a sequence of numbers or...
View ArticleFind range of missing values in a sequence of numbers or dates
One of the frequently asked questions is about Gaps and Islands problems which involve finding a range of missing values (gaps) or a range of consecutive values (islands) in a sequence of numbers or...
View ArticleOuter-joins Oracle vs ANSI syntax
this is one of the frequently asked questions about the use of “+” operator in Oracle join syntax. For beginners it is usually a confusion to interpret the different syntax. One of the good reasons to...
View ArticleOracle String Aggregation Techniques
This is a frequently asked question “How to display multiple rows in a single row as a delimited string”. It is basically string aggregation. I will demonstrate the various techniques of string...
View Article