-2

简短的问题,限制子句在 Postgresql 中的位置?我想将行数限制为 10,但是当我这样做时它给了我一个错误;

From this_table x
    join this_table y
    on x.no = y.no


where x.no = '7'
Limit 10
group by x.location
order by x.location

它在“where”处或附近给了我一个语法错误

(如果需要,我可以添加 select 语句。

4

1 回答 1

2

limitselect查询中的最后一个子句,因此它位于order by

select <whatever>
From this_table x
    join this_table y
    on x.no = y.no
where x.no = '7'
group by x.location
order by x.location
Limit 10;
于 2014-05-09T22:33:09.023 回答