是否可以在WHERE子句中使用LIMIT x? 如果是这样,怎么办?
我正在尝试这样做:
select * from myVIew LIMIT 10 where type=3;
但我收到以下错误:
ERROR: syntax error at or near "where" LINE 2: where type=3; ^ ********** Error ********** ERROR: syntax error at or near "where" SQL state: 42601 Character: 44
select * from myVIew where type=3 LIMIT 10;
Limit应该在之后where clause。
Limit
where clause
句法 :
SELECT column_name(s) FROM table_name [WHERE] LIMIT number;