Does "select * from mactor order by id desc limit 1" and
"select * from mactor order by id limit 1" not work?
Greetings, Christian
On 4/14/05, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> EXPLAIN is your friend. As can be seen by EXPLAINing each query (see below),
> there are fewer instructions involved in the one with the subquery, and no
> sorts or loops as are done in the initial method.
Well, not everybody is a specia
Thomas Steffen <[EMAIL PROTECTED]> writes:
> On 4/14/05, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
>> How about these:
>>
>> SELECT * from Mactor WHERE id = (SELECT MAX(id) FROM Mactor);
>> SELECT * from Mactor WHERE id = (SELECT MIN(id) FROM Mactor);
>
> I am working on a similar proble
On 4/14/05, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> How about these:
>
> SELECT * from Mactor WHERE id = (SELECT MAX(id) FROM Mactor);
> SELECT * from Mactor WHERE id = (SELECT MIN(id) FROM Mactor);
I am working on a similar problem at the moment, but unless I missed
something, ORDER B
"Miha Vrhovnik"<[EMAIL PROTECTED]> writes:
> SELECT * FROM Mactor WHERE id < 9223372036854775807 ORDER BY id DESC LIMIT 1;
>
> where 9223372036854775807 is Maximum value of signed Int64.
>
> P.S. If anybody has better Idea of how to get the last/first row (the one
> with highest/lowest ID) then co
try
SELECT * FROM Mactor WHERE id=(Select max(id) from Mactor); //with this you get
last id.
SELECT * FROM Mactor WHERE id=(Select min(id) from Mactor); //with this you get
first id.
Xavier
Miha Vrhovnik wrote:
Hi,
sqlite dll is 3.2.1
I have the folowing query:
SELECT * FROM Mactor WHERE id < 922
Hi,
sqlite dll is 3.2.1
I have the folowing query:
SELECT * FROM Mactor WHERE id < 9223372036854775807 ORDER BY id DESC LIMIT 1;
where 9223372036854775807 is Maximum value of signed Int64.
Table is defined as:
CREATE TABLE Mactor (
id INTEGER PRIMARY KEY,
name TEXT,
birthName TEXT,
birthday D
7 matches
Mail list logo