是否可以将LIMIT x与WHERE子句一起使用? 如果是这样,怎么样?SQL LIMIT与WHERE子句
我试图做到这一点:
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
那应该做什么? – NullUserException
限制返回的行数。 – capdragon
如果您使用PostgreSQL,为什么在标题中有“MySQL”? –