From: | "Ben-Nes Michael" <miki(at)canaan(dot)co(dot)il> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | apend table 2 to table 1 in 1 row. |
Date: | 2001-12-02 12:57:24 |
Message-ID: | 005601c17b30$e3b633a0$aa0f5ac2@canaan.co.il |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi All
im trying to do a select that will return me the JOIN result appended in one
row per user_id and not in multi columns.
Is it possible ?
user_id | username | pet_type | pet_name | pet_type | pet_name |
1 | BH | dog | Garfield | cat |
Garfield |
CREATE TABLE users (
user_id SERIAL PRIMARY KEY,
username VARCHAR(10)
)
CREATE TABLE users_prop (
user_id INT4 REFERENCES users ON UPDATE CASCADE ON DELETE CASCADE,
pet_type VARCHAR(10),
pet_name VARCHAR(10)
)
--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-12-02 15:06:19 | Re: INSERT INTO BUG |
Previous Message | Serguei Mokhov | 2001-12-01 18:34:53 | Re: Could be a FAQ: prepare/execute in PHP? |