如何限制Ingres中任意查询的结果集大小? [英] How to limit result set size for arbitrary query in Ingres?

查看:105
本文介绍了如何限制Ingres中任意查询的结果集大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Oracle中,可以通过过滤虚拟" rownum列来限制在任意查询中返回的行数.考虑下面的示例,该示例最多返回10行.

In Oracle, the number of rows returned in an arbitrary query can be limited by filtering on the "virtual" rownum column. Consider the following example, which will return, at most, 10 rows.

SELECT * FROM all_tables WHERE rownum <= 10

在Ingres中是否有一种简单的通用方法来做类似的事情?

Is there a simple, generic way to do something similar in Ingres?

推荐答案

公然更改我的答案. 限制10"适用于MySql等,Ingres使用

Blatantly changing my answer. "Limit 10" works for MySql and others, Ingres uses

Select First 10 * from myTable

参考

这篇关于如何限制Ingres中任意查询的结果集大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆