pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Kretschmer <akretschmer@spamfence.net>
To: pgsql-sql@postgresql.org
Subject: Re: regarding join
Date: Sat, 25 Mar 2006 08:45:54 +0100
Message-ID: <20060325074554.GA6978@KanotixBox> (raw)
In-Reply-To: <ad39daf90603242236w1f6a54ecx7ba4d1b24dfdc18c@mail.gmail.com>
References: <ad39daf90603242236w1f6a54ecx7ba4d1b24dfdc18c@mail.gmail.com>

AKHILESH GUPTA <akhilesh.davim@gmail.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°



view thread (4+ messages)  latest in thread

Message-ID: <20060325074554.GA6978@KanotixBox>
Permalink:  ../20060325074554.GA6978@KanotixBox/
Also on:    postgresql.org/message-id/20060325074554.GA6978@KanotixBox

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: akretschmer@spamfence.net
  Subject: Re: regarding join
  In-Reply-To: <20060325074554.GA6978@KanotixBox>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox