All Forums UDA
rk_theprince 7 posts Joined 05/10
26 Sep 2010
Rank in Teradata

Hi everyone
I am new to teradata,
can some one explain me what is Rank() function in Teradata and what does it do

Thanks in advance

dnoeth 4628 posts Joined 11/04
27 Sep 2010

It's a Standard SQL function, which is available in most DBMSes.

Just read the SQL Functions and Operators manual.

Dieter

Dieter

gotuchintu 32 posts Joined 12/05
14 Oct 2010

consider using row_number if you want to generate a unique rank for the data.

Somnath Roy

k_suji86 6 posts Joined 05/10
15 Oct 2010

The Ranking function permits a column to be ranked, either based on high or low order,
against other rows in the answer set. By default, the output will be sorted in descending
sequence of the ranking column, which correlates to descending rank.
The Rank function is defined as follows:
RANK(colname)
Where:
colname = the column to be ranked and the descending sort key of the result

pubesh 2 posts Joined 03/11
23 Mar 2011

Rank is the only function in teradata which gives the output in descending order.which is both teradata and ansi standard extension.
sel sal,rank(sal) from tablename......
if we need in ascending order then give asc....

You must sign in to leave a comment.