有的时候,表中记录很大的情况下,我们只想看其中一部分数据,例如10%的数据。 可以使用select distinct(x) from t sample(10); sample子句去查询,取值的结果不是百分百的10%,差的也不是很多。