2011/10/19 Fabian
>
>
> Maybe there is just no easy way to do what I want, I will take a good night
> sleep about it ;)
>
>
I think the correct query would be:
SELECT table1.data1, table2.data2
FROM
(
SELECT table1.rowid, table1.data1
WHERE table1.data1 = 10
) AS table1
bianpi...@gmail.com>
Subject: Re: [sqlite] Fast JOIN
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
Date: Tuesday, October 18, 2011, 10:17 PM
>
>
> Assuming that is a typo, does the following not do what you want?
>
> SELECT table1.data1, table2
>
>
> Assuming that is a typo, does the following not do what you want?
>
> SELECT table1.data1, table2.data2
> FROM
> (
> SELECT table1.rowid, table1.data1
> WHERE table1.data1 = 10
> ORDER BY table1.rowid DESC
> OFFSET 0 LIMIT 250
> ) AS table1
> JOIN table2
> ON table1.rowid = table2.rowid
>
On 18 October 2011 22:09, Fabian wrote:
> I'm working on a pagination system where two tables need to be joined.
.
.
.
>
> I got very good advice on this mailing-list, to change the query into this:
>
> SELECT table1.data1, table2.data2
> FROM
> (
>
> SELECT table1.data1
>
On Oct 18, 2011, at 11:09 PM, Fabian wrote:
> Is there any solution for this?
Perhaps this is not a technical issue, but rather a design one, as you seem to
be, hmmm, tilting at windmills.
___
sqlite-users mailing list
sqlite-users@sqlite.org
I'm working on a pagination system where two tables need to be joined. At
first my query looked like this:
SELECT table1.data1, table2.data2
FROM table1
JOIN table2 ON table1.rowid = table2.rowid
WHERE table1.data1 = 10
ORDER BY table1.rowid DESC
OFFSET 0 LIMIT 250
I got very good advice on this
6 matches
Mail list logo