How to SELECT

Поиск
Список
Период
Сортировка
От Angayarkanni
Тема How to SELECT
Дата
Msg-id 2a77004c1003102256l24af41e5ueab35874f5320ffa@mail.gmail.com
обсуждение исходный текст
Ответы Re: How to SELECT  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: How to SELECT  (Dave Crooke <dcrooke@gmail.com>)
Список pgsql-performance
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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Ben Chobot
Дата:
Сообщение: Re: shared_buffers advice
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: How to SELECT