【发布时间】:2020-12-27 03:06:35
【问题描述】:
我想减少从查询结果中导出的行数。我没有运气适应发布在on this thread 上的公认解决方案。
我的查询如下所示:
select
round((to_date('2019-12-31') - date_birth) / 365, 0) as age
from
personal_info a
where
exists
(
select person_id b from credit_info where credit_type = 'C' and a.person_id = b.person_id
)
;
这个查询返回的行数比我需要的多,所以我想知道是否有办法使用sample() 从这个查询产生的许多行中选择固定数量的行(不是百分比)。
【问题讨论】: