|
|
Archives of the TeradataForum
Message Posted: Wed, 22 Mar 2006 @ 12:31:55 GMT
Subj: | | Re: Usage of TOP function |
|
From: | | Altaf, Muhammad |
TOP function is introduced in V2R6, and the purpose of this function is to obtain a portion of the data from result set. If you are looking for
ordered set, then you can use it with ORDER BY clause, which will give you highest or lowest value depending on whether you choose ASC or DESC in
ORDER BY clause.
I do not have Teradata V2R6 currently, but you can check it your self by running the SQL few times and match the results. I believe that it is
random based on hash values if order by clause is not used.
Regards,
Muhammad Altaf
| |