=?UTF-8?B?R8OhYm9yIEZhcmthcw==?= [EMAIL PROTECTED] wrote:
select * from role
LEFT OUTER JOIN person_role on role.id = person_role.role_id
INNER JOIN person on person_role.person_id = person.id
WHERE person.id=1;
5|admin|1|5|1|john
6|devel
i think it should only output the first
hi,
consider the following sql:
CREATE TABLE person (
id integer,
name varchar
);
CREATE TABLE role (
id integer,
name varchar
);
CREATE TABLE person_role (
person_id integer,
role_id integer,
UNIQUE (person_id, role_id)
);
insert into person values (1,'john');
Gábor Farkas wrote:
i think it should only output the first row ( 5|admin|1|5|1|john )
tried what you describe and get the answer you expect, not the one you got:
sqlite select * from role
... LEFT OUTER JOIN person_role on role.id = person_role.role_id
... INNER JOIN person on
this SQLite!
RBS
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 14 November 2006 12:41
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] LEFT OUTER JOIN + INNER JOIN problem
=?UTF-8?B?R8OhYm9yIEZhcmthcw==?= [EMAIL PROTECTED] wrote:
select * from role
LEFT OUTER
On Tue, 14 Nov 2006 13:17:17 +0100, you wrote:
Gábor Farkas wrote:
i think it should only output the first row ( 5|admin|1|5|1|john )
tried what you describe and get the answer you expect, not the one you got:
[...]
using debian 3.1, sqlite3 3.3.8,
the same also on Mac OS X, sqlite3 3.3.7...
[EMAIL PROTECTED] wrote:
=?UTF-8?B?R8OhYm9yIEZhcmthcw==?= [EMAIL PROTECTED] wrote:
select * from role
LEFT OUTER JOIN person_role on role.id = person_role.role_id
INNER JOIN person on person_role.person_id = person.id
Your work-around is to say CROSS JOIN here instead of
INNER JOIN.
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
=?UTF-8?B?R8OhYm9yIEZhcmthcw==?= [EMAIL PROTECTED] wrote:
select * from role
LEFT OUTER JOIN person_role on role.id = person_role.role_id
INNER JOIN person on person_role.person_id = person.id
Your work-around is to say CROSS JOIN here