SQL

The articles related to SQL.

Latest DML time on a table

In this post we will see how to find the latest DML time performed on the table. For this we are going to use ORA_ROWSCN Pseudocolumn. ORA_ROWSCN returns the conservative upper bound system change number (SCN) of the most recent change to

Difference between count(*) and count(1) – Part 3

In the last two post we have seen the two scenarios to check the difference between count(*) and count(1) executions. Execution plans and statistics from both the scenarios confirmed that there is no any difference difference between the executions of these

Difference between count(*) and count(1) – Part 2

In the last post I have demonstrate the scenario for employee table without any index to differentiate the executions of count() and count(1). That demonstration proved that there is no any difference between count() and count(1) executions. If you have

Difference between count(*) and count(1) – Part 1

Almost everyone have used both the functions count() and count(1). I heard different views about the difference between count() and count(1) functions. Some people says that count(1) only counts the number of rows of tables first column whereas count(*) counts

Oracle Query Tuning – Example 3

In this query tuning example we will see how to index table columns null value to improve the performance of query. Many developers writes queries which has filter condition as NULL i.e. they are quering the tables with something IS

APPROX_COUNT_DISTINCT Function – Oracle 12c

The need to count distinct values of column is common operation in data analysis. It helps to decide whether an index will be useful or not. Prior to 12c database, we need to execute a query on the table to

Return dataset from function using pipelined table function

In this post I am going to demonstrate how to return dataset from function in PL/SQL using pipelined table function. For this we need to perform below steps. Create TYPE object as OBJECT of the structure of required output format Create

Oracle Query Tuning – Example 2

Day by day technology is upgrading and every organization tries to make easy way of communication for their customers. In our day-today life when we make any payment, Recharge Mobiles etc, we get notification on mobile phone via SMS. These

Page 1 of 3123