Category: PL/SQL

PL/SQL Dense_Rank

Oracle PL/SQL Dense_Rank Function The Dense_Rank function allow you to rank items in a group and not like Rank function the Dense_Rank function leaves no gaps in ranking sequence when there are ties. The Dense_Rank Function syntax: DENSE_RANK ( ) OVER...

PL/SQL Decode

Oracle PL/SQL Decode Function The Decode function is equivalent with an IF-THEN-ELSE statement. The Decode Function syntax: decode( expression , search , result [, search , result]… [, default] ) Example: SELECT name, decode(id, 100, 'JSP', 101, 'ASP', 102, 'PHP', 'Java')...

PL/SQL Current_Timestamp

Oracle PL/SQL Current_Timestamp Function The Current_Timestamp returns the current system timestamp. The Current_Timestamp Function syntax: current_timestamp Example: Select current_timestamp From dual; 01-05-2018 12:30:27,078000000 EUROPE/ATHENS...

PL/SQL Current_Date

Oracle PL/SQL Current_Date Function The Current_Date returns the current date in the time zone of the current SQL session as set by the ALTER SESSION command. The Current_Date Function syntax: current_date Example: Select current_date From dual; 01-05-2018...

PL/SQL Cume_Dist

Oracle PL/SQL Cume_Dist Function The Cume_Dist function returns the relative position of a row within a group meeting certain criteria. The Cume_Dist Function syntax: cum_dist(exp1,… WITHIN GROUP (ORDER BY) Aggregate Function Example: Select cume_dist(1200, 500) WITHIN GROUP (ORDER BY e.sal, e.comm)...