Monday, May 9, 2016

Diff Between Post – Change, When-Validate-Item, Post-Test-Item

Diff Between Post – Change, When-Validate-Item, Post-Test-Item

Post-Test-Item” Trigger fires every time when focus moves from one item to another item.

“Post – Change”, ”When-Validate-Item” à Both Triggers Have the same functionality except
that Post-Change doesn’t fire in one case when existing value is changed to NULL While in that case When-Validate-Item trigger fires. And all other functionality of these both triggers are same in the manner that both fires when the status of the item becomes ‘CHANGED’. If status remains ‘UNCHANGED’ then these both trigger doesn’t fires.

Sunday, April 24, 2016

Find out the nth-highest salary from table

select * from 
(
    select sal, rank() over (order by sal DESC/ASC) rnk 
    from emp
) 
where rnk = 1/2/3/4/5/6/...;

Sunday, January 31, 2016

Oracle select primary key name

Dear my readers

here I present example for how to select the primary key name which existing inside the table user_constraints

select constraint_name
from user_constraints
where constraint_type = 'P'
and table_name = upper('emp_eff')
/

hope useful for all

for any question you can email me on yasser.hassan@yandex.com
Yasser