Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

is that standard though?

by cebrown (Pilgrim)
on Apr 30, 2002 at 14:04 UTC ( #163064=note: print w/replies, xml ) Need Help??


in reply to Re: Re: The fine art of database programming
in thread The fine art of database programming

I believe that LIMIT is a DBMS-specific extension. For example...
in MS SQL Server:
SELECT TOP 10 col FROM table
in IBM DB2:
SELECT col FROM table FETCH FIRST 10 ROWS ONLY
I think the only platform independent way to do this is:
SELECT col FROM table A WHERE 10 > (SELECT COUNT(*) FROM table B WHERE A.col < B.col) ORDER BY col DESC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://163064]
help
Chatterbox?
[Eily]: s/complete ness/complete mess/ :P
[Eily]: and you can overload "0+" rather than bool, as numification is used instead of stringification in boolean context when available

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (11)
As of 2017-07-27 14:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (415 votes). Check out past polls.