pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Angayarkanni <kangayarkanni@gmail.com>
To: pgsql-performance@postgresql.org
Subject: How to SELECT
Date: Thu, 11 Mar 2010 12:26:02 +0530
Message-ID: <2a77004c1003102256l24af41e5ueab35874f5320ffa@mail.gmail.com> (raw)

Hi,

I am the beginner of pgpsql


I need to select from two tables say T1,T2 by UNION

when the value is from T1 the output should by a 1 and
when the value from T2 the out put should be 2

when T1 Hits values should be 1 and when T2 hits the value should be 2


or when we use
COALESCE(is exits  value, or this value)

i need
say_some_function (if value display,1)

results should be as
1
1
2
2
1
1

Is it possible Can any one help me...

Thanks & Regards
AK

view thread (4+ messages)  latest in thread

Message-ID: <2a77004c1003102256l24af41e5ueab35874f5320ffa@mail.gmail.com>
Permalink:  ../2a77004c1003102256l24af41e5ueab35874f5320ffa@mail.gmail.com/
Also on:    postgresql.org/message-id/2a77004c1003102256l24af41e5ueab35874f5320ffa@mail.gmail.com

 · 

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-performance@postgresql.org
  Cc: kangayarkanni@gmail.com
  Subject: Re: How to SELECT
  In-Reply-To: <2a77004c1003102256l24af41e5ueab35874f5320ffa@mail.gmail.com>

* 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