Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Sampling a certain percent of rows from a table!
Hi,
Can someone explain the following. The total number of rows in the table is 14. So sampling 50% should always give me a count of 7, right? But notice that it shows different outputs for the same same query. Am I being mistaken somewhere?
SQL> select count(*) from emp;
COUNT(*)
14
SQL> select count(*) from emp sample(50);
COUNT(*)
6
SQL> select count(*) from emp sample(50);
COUNT(*)
7
SQL> select count(*) from emp sample(50);
COUNT(*)
7
SQL> select count(*) from emp sample(50);
COUNT(*)
7
SQL> select count(*) from emp sample(50);
COUNT(*)
8
Thanks,
A$!f.
Received on Sat Jan 24 2004 - 01:10:50 CST
![]() |
![]() |