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
In Section
Seekers of Perl Wisdom