DENSE_RANK() Analytic Function:
DENSE_RANK calculates the rank of a value in a group of values. The return type is NUMBER.
If two or more rows tie for a rank, each tied rows receives the same rank. For example, if the two top employees have the same sala...
Difference b/w DENSE_RANK() and RANK():
There is a small difference b/w DENSE_RANK() and RANK()
Lets take one example!
I will inlcude these two results in one query. Then we can find the diff easily. Upto 3rd rank both functions are working same..But 4,5 ...
RANK() Analytic Function:
RANK calculates the rank of a value in a group of values. The return type is NUMBER.
If two or more rows tie for a rank, each tied rows receives the same rank. For example, if the two top employees have the same salary value, th...
The Oracle/PLSQL NVL function lets you substitute a value when a null value is encountered.
NVL( string1, replace_with )
string1 is the string to test for a null value.
replace_with is the value returned if string1 is null.
The Oracle NVL2 function extends the functionality found in the NVL function. It lets you substitutes a value when a null value is encountered as well as when a non-null value is encountered.
NVL2( string1, value_if_NOT_null, value_if_null...
This function is used to calculate the length of a string or column in query.
Here space is also treated as one more character. so the count is 10.
Queries used in Video:
select ename,length(ename) from emp;
select length('oracle num') from dua...
UPPER returns char, with all letters uppercase. char can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The return value is the same datatype as char. The database sets the case of the characters based on the binary ma...
CONCAT returns char1 concatenated with char2. Both char1 and char2 can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The string returned is in the same character set as char1. Its datatyp...