Difference between TOP and SAMPLE in Teradata SQL?

We can find the difference clearly while using ORDER by clause.

Eg:- Select TOP 10 cust_name from customer order by dept_id;

TOP displays the first 10 rows in Sorted order from the table.
SAMPLE displays any 10 rows randomly from the table.


3 comments: