Re: rows
From: Ed Seedhouse (eseedhouse_at_510shaw.ca)
Date: 12/05/03
- Next message: Luigi Donatello Asero: "Re: PHP or Java: disadvantages and advantages"
- Previous message: gorf: "Re: PHP or Java: disadvantages and advantages"
- In reply to: RvD: "Re: rows"
- Next in thread: RvD: "Re: rows"
- Reply: RvD: "Re: rows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 05 Dec 2003 14:45:27 GMT
On Fri, 05 Dec 2003 10:18:19 +0100, RvD <ik@daar.ergens> wrote:
>> SELECT * FROM table ORDER BY id LIMIT 1
>> SELECT * FROM table ORDER BY id DESC LIMIT 1
>Is there no fuction wich selects the first or last row?
Well, what do you mean by "last row"? Relational databases aren't
supposed to have "first" and "last" rows in any physical sense. The
first and last rows are a logical construct determined by the index in
effect, not a physical one.
Order of storage on the disk is irrelevant and in a relational
database system isn't supposed to be even available to the user. In
fact if there is a defined order for storage then the database isn't
relational.
The SQL given above does what you want so far as I can see. If that
isn't what you want, then you should make what you want clearer.
Ed
- Next message: Luigi Donatello Asero: "Re: PHP or Java: disadvantages and advantages"
- Previous message: gorf: "Re: PHP or Java: disadvantages and advantages"
- In reply to: RvD: "Re: rows"
- Next in thread: RvD: "Re: rows"
- Reply: RvD: "Re: rows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|