From: | Andreas Kretschmer <akretschmer(at)spamfence(dot)net> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: regarding join |
Date: | 2006-03-25 07:45:54 |
Message-ID: | 20060325074554.GA6978@KanotixBox |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
AKHILESH GUPTA <akhilesh(dot)davim(at)gmail(dot)com> schrieb:
> hi all,
> below I have created two tables in pgsql with field name as 'name' and 'id' as
> their datatype 'varchar(15)' and 'integer'.
> i want the output as:->
... a UNION of this 2 tables:
test=# select * from test1 union select * from test3 order by 2,1;
name | id
-------+----
ab | 1
akhil | 1
b | 2
cd | 2
c | 3
ef | 3
d | 4
gh | 4
e | 5
f | 6
(10 rows)
HTH, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
From | Date | Subject | |
---|---|---|---|
Next Message | Leon Pu | 2006-03-25 07:54:29 | Re: PostgreSQL support on Redhat Advance Server 2.1 |
Previous Message | AKHILESH GUPTA | 2006-03-25 06:36:34 | regarding join |
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-03-25 08:45:47 | Re: regarding join |
Previous Message | AKHILESH GUPTA | 2006-03-25 06:36:34 | regarding join |