This tutorial guides us on how to pass Array objects from Java to stored procedures in Oracle and also, how to retrieve an array object in Java.All PLSQL arrays can not be called from java. An array needs to be created as TYPE, at SCHEMA level in the database and then it can be used ...
Oracle 11g introduced SKIP LOCKED clause to query the records from the table which are not locked in any other active session of the database.This looks quite similar to exclusive mode of locking.The select for update statement has always been problematic for large updates because it the default is to wait for locks and using select for ...
With Oracle 9i, the Cost-Based Optimizer (CBO) is equipped with many useful features, one of them is "Index skip scan". In previous releases a composite index could only be used if the first column, the leading edge, of the index was referenced in the WHERE clause of a statement. In Oracle 9i this restriction is removed ...
ROWNUM is a magic column in Oracle Database that gets many people into trouble. When you learn what it is and how it works, however, it can be very useful. I use it for two main things:To perform top- N processing. This is similar to using the LIMIT clause, available in some other databases. To paginate through a ...
A lot of developers might be confused about index selectivity while using %LIKE% operator. So please find below how index worked when you use LIKE operator.Problem StatementWhile optimizing high CPU consuming queries on 3rd party application, verified that most of the queries are using '%LIKE%' operator. Interestingly enough, while some of these queries are going for "INDEX RANGE" while others are going for "FULL TABLE ...
How can you convert a number into words using Oracle Sql Query? What I mean by Number to Word is:Here's a classy query which will convert number into words.Please see the query below:select to_char(to_date(:number,'j'),'jsp') from dual;If I pass 234 in number, then the output will : two hundred thirty-fourSELECT TO_CHAR (TO_DATE (234, 'j'), 'jsp') ...
Oracle 11g introduced the concept of 'Virtual Column' within a table. Virtual Columns are similar to normal table's columns but with the following differences:They are defined by an expression. The result of evaluation of this expression becomes the value of the column. The values of the virtual column are not stored in the database. Rather, it's computed ...
Aggregate functions return a single result row based on a group of rows. This differentiates them from Single-Row functions which act on each row. These functions are extensively used with the GROUP BY clause in SQL statements. AVG (), COUNT (), SUM () ... are few aggregate functions which are quite commonly used. Today, one ...
Most of the times, production data is not available in development environments. Here, I would like to share a single sql command which can generate random data. But before that, let's address another issue faced by a lot of new oracle users. We need to generate a sequence of numbers using a sql statement. This will generate a number sequence. ...
Deleting duplicate rows from tables is one of the common task oracle developers come across. The data might get duplicated because of missing primary/unique key on the table or batch file getting loaded multiple times. Here I have tried to summarize different ways of deleting this duplicated data. Please note that this is not an extensive list ...