Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: Using the DBI to return the first ix/i rows

by eg (Friar)
on Jan 25, 2001 at 16:36 UTC ( [id://54253]=note: print w/replies, xml ) Need Help??


in reply to Re: Using the DBI to return the first ix/i rows
in thread Using the DBI to return the first ix/i rows

In case you're using Oracle: you don't have a LIMIT SQL command (go figure), so you need to use ROWNUM instead:

SELECT * FROM table WHERE ROWNUM < 10;

Replies are listed 'Best First'.
Re: Re: Re: Using the DBI to return the first ix/i rows
by davorg (Chancellor) on Jan 25, 2001 at 16:40 UTC

    Sybase doesn't have either of those mechanisms. You need to do it in two steps.

    set rowcount 10 select * from table
    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://54253]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found