> 2. The above statement gets the lowest rowid but there appears to be
> no
> implicit statement to the direction of the ORDER BY clause. Can the
> statement be reversed to get the highest rowid?
> SELECT ... FROM ORDER BY rowid DESC LIMIT 1;
Okay, I feel very stupid now, hadn't twigged. I
On Dec 22, 2008, at 6:18 PM, flakpit wrote:
>
>
>
> Dan Kennedy-4 wrote:
>>
>>
>>> Is there any way to fetch the very first record in the database and
>>> find the > id number?
>>
>> The 'first record' is a malleable concept. You can find the record
>> with
>> the lowest rowid value with:
>>
>>
Dan Kennedy-4 wrote:
>
>
>> Is there any way to fetch the very first record in the database and
>> find the > id number?
>
> The 'first record' is a malleable concept. You can find the record with
> the lowest rowid value with:
>
>SELECT ... FROM ORDER BY rowid LIMIT 1;
>
>
Thank y
On Dec 22, 2008, at 5:43 PM, flakpit wrote:
>
> Good evening.
>
> Due to many deletions, my database is non sequential anymore.
>
> Is there any way to fetch the very first record in the database and
> find the
> id number? Or for that matter, a function to select the last record?
>
> I've trie
4 matches
Mail list logo