From: | "Keith Turner" <kturner(at)cloudsystems(dot)com> |
---|---|
To: | <pgsql-novice(at)postgresql(dot)org> |
Subject: | Inner Join question |
Date: | 2008-11-07 20:45:49 |
Message-ID: | E15577A9B0DBD9489F41C761934D08C87008A2@cloudfs1.cloudsystems.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi,
I have three tables
1) A list of devices
2) List of rooms
3) A bridge table that relates the two using each table's ID column
Any device can be in 0 to All rooms
I want to create a view that joins both tables that in includes all
columns from all 3 tables.
I'm not sure how to link joins in the Postgres SQL syntax. I'm more used
to the =* one.
I want to do something like
SELECT (explicit list of all tables columns - didn't like * but was ok
with actual list)
FROM
devices,rooms,bridge
WHERE
bridgeroomid = rooms.id
AND
bridgedeviceid=*devices.id
so that devices with no associated rooms would have null values for
those columns but be listed.
Any advice appreciated.
KDT
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Swierczek | 2008-11-07 21:23:23 | Re: Inner Join question |
Previous Message | Phillip Sitbon | 2008-11-07 19:37:37 | Inter-server queries |