Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Going to first record on a record set in DBI

by Abigail-II (Bishop)
on Jul 21, 2003 at 12:22 UTC ( [id://276234]=note: print w/replies, xml ) Need Help??


in reply to Re: Going to first record on a record set in DBI
in thread Going to first record on a record set in DBI

Indeed. In a relational way of thinking, it only make sense to talk about the "first N rows", if you have a query with an ORDER BT clause. If you want the "first row" given some ordering, you can often do that with a WHERE clause. Say:
SELECT name, gender FROM people ORDER BY age LIMIT 1

can also be written as

SELECT name, gender FROM people WHERE age = MIN (age)

That is, you ask for the record with minimum age.

Abigail

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-22 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found