OracleBrains.Com header image 5

Entries Tagged as 'SQL and PL/SQL'

Generating same column of a table with ascending order and descending order Simple query

July 26th, 2008 · 3 Comments

SELECT E1.EMPNO,E2.EMPNO FROM (SELECT ROWNUM r1,empno FROM emp ORDER BY empno DESC)e1,(SELECT ROWNUM r2,empno FROM emp ORDER BY empno ASC) [...]

[Read more →]

Tags: SQL and PL/SQL · SQL*Plus

Generating the series of number with simple sql query

March 26th, 2008 · 3 Comments

Today I came across this thread at Oracle Forum.
Where Question was as follows:
Consider Test table have Numb (Number datatype) field. [...]

[Read more →]

Tags: SQL and PL/SQL

SP2-0611: Error enabling STATISTICS report

December 17th, 2007 · No Comments

Today when doing some research on “FAST DUAL”, I came across following error when I try to set autotrace on:
SQL> [...]

[Read more →]

Tags: SQL and PL/SQL

Is the Oracle 11g smart enough to ignore the virtual column?

December 16th, 2007 · 2 Comments

On 13th October 2007, I wrote about “Understanding Virtual Columns“.
Then Ray DeBruyn ask me a very good question, which I [...]

[Read more →]

Tags: Oracle 11g New Features · SQL and PL/SQL

Going Backend of new feature of 11g related to Sequences

December 15th, 2007 · 4 Comments

On 12th july 2007, I wrote a post about new feature of 11g related to sequence.
In this post I mention [...]

[Read more →]

Tags: Oracle 11g New Features · SQL and PL/SQL

REMAINDER Function

December 14th, 2007 · 5 Comments

I don’t why but I never came across this function, may be because I am so used to using MOD [...]

[Read more →]

Tags: SQL and PL/SQL

Deleting duplicate row in certain condition using Join!

December 1st, 2007 · No Comments

Scenario From Oracle Forum
I have a transaction table consists of duplicate records I success to write a sql
which get the [...]

[Read more →]

Tags: Interesting Coding Showcase · SQL and PL/SQL

Creating Primary Key On Duplicate Values

November 13th, 2007 · No Comments

Check out following:
SQL> select * from test;
COL1
———-
[...]

[Read more →]

Tags: Oracle Administration · Oracle Database · SQL and PL/SQL

Understanding DETERMINISTIC Functions or DETERMINISTIC Clause

October 14th, 2007 · 2 Comments

When working with virtual columns recently I came across the following error:
ORA-30553: The function is not deterministic
Cause: The function on [...]

[Read more →]

Tags: Oracle Administration · Oracle Database · SQL and PL/SQL

SQL::Life of a SQL statement in nutshell

September 30th, 2007 · 1 Comment

Just trying to brush up few basic concept!
What happens when Oracle processes an SQL Statement?

Step 1: Oracle Create a Cursor
For [...]

[Read more →]

Tags: Oracle Concepts · Oracle Database · SQL and PL/SQL