Overblog All blogs Top blogs Jobs, Education & Studies
Follow this blog Administration + Create my blog
MENU
Advertising

DENSE_RANK

DENSE_RANK is an Analytical function as well as Aggregate function in Oracle. It returns the rank of the row within the group and it is dense. Syntax (Aggregate function): dense_rank(expression1,expression2,…) WITHIN GROUP (ORDER BY expression1,expression2…)...

Read more

Advertising

Nth highest salary

Nth highest salary 1) Find highest salary/salaries using DENSE_RANK() function select * from (select empno,salary,dense_rank() over(order by salary desc) as rk from emp) where rk = 1; EMPNO SALARY RK ———- ———- ———- 10 12000 1 2) Find 2nd highest salary/salaries...

Read more

Translate function Oracle

Translate function Oracle Posted on September 30, 2012 by sqlandplsql TRANSLATE function replaces a string with another set of characters.TRANSLATE replace characters in sequential order. Syntax TRANSLATE(string, from_string, to_string) Example 1:- SQL>...

Read more

Replace function Oracle

Replace function Oracle Posted on September 24, 2012 by sqlandplsql Replace function replaces the string with another string if it matches. It is a character function in Oracle. Replace function is case-sensitive. Syntax:- REPLACE(‘input string’,’find_string’,’replace_string’);...

Read more

Advertising

PL/SQL Functions Syntax in oracle

CREATE [OR REPLACE] FUNCTION [SCHEMA..] function_name [ (parameter [,parameter]) ] RETURN return_datatype IS | AS [declaration_section variable declarations; constant declarations; ] BEGIN [executable_section PL/SQL execute/subprogram body ] [EXCEPTION]...

Read more

PL/SQL functions in oracle

PL/SQL functions block create using CREATE FUNCTION statement. The major difference between PL/SQL function or procedure, function return always value where as procedure may or may not return value. When you create a function or procedure, you have to...

Read more

Advertising

What is ROWID?

What is ROWID? ROWID is a pseudo column attached to each row of a table. It is 18 characters long, blockno, rownumber are the components of ROWI

Read more

What's Deadlock

What's Deadlock Deadlock is a unique situation in a multi user system that causes two or more users to wait indefinitely for a locked resource. First user needs a resource locked by the second user and the second user needs a resource locked by the first...

Read more

<< < 10 20 30 40 41 42 43 44 45 46 47 48 49 > >>