starplus2010
Programmer
Hi Guys
I need to select N number of records from oracle Table.
Example:
10 records from a table.
I used "SAMPLE" Keyword.
"select * from Emp order by sample(1)"
It gives 1% of total records in a table.
It works fine and selcts randomly. But everytime no of records changes less or more.
I need only 10 records randomly.
Any Idea?
Please Help me.
I need to select N number of records from oracle Table.
Example:
10 records from a table.
I used "SAMPLE" Keyword.
"select * from Emp order by sample(1)"
It gives 1% of total records in a table.
It works fine and selcts randomly. But everytime no of records changes less or more.
I need only 10 records randomly.
Any Idea?
Please Help me.