Archives of the TeradataForum
Message Posted: Tue, 03 Nov 2015 @ 21:30:00 GMT
How to do this may depend on your definition of 'random'.
Teradata fetches rows in parallel and does not sort them unless you tell it to. If you just fetch 'n' rows from a table - with no Order by or Where clause - those rows will effectively be random.
You can use "Select Top n ..."
I don't think either of these performs any sorting so you should get an essentially random set of rows. (Check the docs for details just to be sure ... and maybe they will tell you which is better performance)
|Copyright 2016 - All Rights Reserved|
|Last Modified: 24 Jul 2020|