Tag Archives: SQL

Generate Script for Foreign key’s in SQL Server.

During conducting one of the Proof Of Concept around “InMemory“, we had to disable foreign key to use Migration wizard provided by SSMS. Before disable, we had to create script for all foreign key for multiple tables in Database and … Continue reading

Rate this:

Posted in Helper SQL, SQL Server Learning | Tagged , , , , , , , , , | Leave a comment

Analytical Function at Rescue

With Analytical function in oracle, we can leverage very powerful data projections for complex data requirement. It exhibit great tool to play around group sets with in a window and achieve desired outcome. Will walk  through one of requirement which application … Continue reading

Rate this:

Posted in Helper SQL | Tagged , , | 1 Comment

Sequence insight

ORA-02287 Sequence fit into many business requirement where we need to implement incremental logic for a integer column value. Using two pseudo columns, we increment and fetches sequence values. NEXTVAL – Increment sequence value CURRVAL – Reuse current incremented value … Continue reading

Rate this:

Posted in Oracle Internal | Tagged , , , | Leave a comment

Playing with ORDER BY clause in oracle.

Most of us must be aware of “ORDER BY” clause and its importance to present data in a specific order (Ascending or Descending). Order by clause is an optional Component of SELECT Query. Oracle Say “Use the ORDER BY clause … Continue reading

Rate this:

Posted in Oracle Internal | Tagged , , , , , , , | 1 Comment

Analytical Function order of processing within SQL.

Personally Believe, Analytical functions in Oracle are Prime addition and provide great advantage in processing for required data projections. In current post will try to explain SQL order of processing for Analytical Functions. Most of us must be aware on … Continue reading

Rate this:

Posted in Oracle Internal | Tagged , , , , | 1 Comment

Aggregate Function Nesting in Oracle.

It’s been a while, I published blog on Oracle. Today we will discuss on, nested aggregation functions and level it can be nested. Lets first understand what is nesting functions. Nested function is concept, when the output of one function … Continue reading

Rate this:

Posted in Oracle Internal | Tagged , , , , , , , | Leave a comment

NOT IN Condition and NULL Data

Before getting into discussions, lets start with a SQL example. Trying to fetch all employees who are not manager! Employee table Structure Name Null Type ——– ——– ———— EMPNO NOT NULL NUMBER(4) ENAME VARCHAR2(10) JOB VARCHAR2(9) MGR NUMBER(4) HIREDATE DATE … Continue reading

Rate this:

Posted in Oracle Internal | Tagged , , , | 2 Comments

Add Not NULL constraint on existing table column having null values

Recently in OTN someone posted a question with scenario as below. “Add Not NULL constraint in the existing table that has null values” At first it seems to be simple, Just an AlTER Command should do. But think what would … Continue reading

Rate this:

Posted in Oracle Internal | Tagged , , , , , , , , | Leave a comment

Rownum condition and Explain plan

Recently posted an observation on OTN pertaining to Rownum and Explain plan for > and < where condition. Though functionality scenarios were incorrect, but as was keen to understand oracle internals wanted to know expert feedback\comments on same. Below are … Continue reading

Rate this:

Posted in Oracle Internal | Tagged , , , , | Leave a comment

Putting special character in middle of string.

Recently in OTN someone posted below SQL requirement. “In one of my column having value of string like ‘12345678’. Now i want not all of these value would be visible. So i would put * on some characters. After updating … Continue reading

Rate this:

Posted in Helper SQL | Tagged , , , | Leave a comment