you might also want to implement paging, added a comment tot the issue

On Sun, Nov 29, 2009 at 1:25 PM, Rainer Döbele <[email protected]> wrote:
> Hi Amin,
>
> unfortunately I must confess that we currently don't have the ability to 
> limit the number of rows returned.
>
> This shows how different people work with databases.
> In my many years of database programming I have never really felt the need 
> for it since I always found a constraint to work with.
> I only sometimes use it for interactive queries to the database.
> But you are right, this is a thing we definitely have to add.
>
> I have created a JIRA issue for that and I will implement that ASAP.
> Unfortunately this feature is handled differently by each database.
> e.g.
> SQL Server:
> SELECT TOP 10 id, name, ...
> FROM contacts
>
> MySQL:
> SELECT id, name, ...
> FROM contacts
> LIMIT 10
>
> ORACLE:
> SELECT id, name, ...
> FROM contacts
> WHERE ROWNUM <= 10
>
> Another option is to use setMaxRows() before executing the statement.
> This looks like a better idea to me since the JDBC driver can handle it.
> Does anyone know if this is really equivalent?
>
> Rainer
>
>
> Amin Abbaspour wrote:
>> re: Limit Query Results inside DBCommand
>>
>> Hello to everyone,
>>
>> This is my first email in empire-db's users list :)
>>
>> One small question; How can I limit the number of rows returned in
>> select statements (i.e. SELECT .... LIMIT x, or SELECT TOP x ...)?
>>
>> Right now I do this manually by appending a "LIMIT x" to my query's
>> string but this is such a frequent requirement that I am pretty sure
>> this is implemented but I failed to find it.
>>
>> Regards,
>> Amin Abbaspour
>>
>>
>>
>>
>



-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

Reply via email to