Re: Can I getting a unique ID from a select

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Can I getting a unique ID from a select
Дата
Msg-id 20070305083542.GA19931@wolff.to
обсуждение исходный текст
Ответ на Re: Can I getting a unique ID from a select  ("Timasmith" <timasmith@hotmail.com>)
Ответы Re: Can I getting a unique ID from a select  ("Timasmith" <timasmith@hotmail.com>)
Список pgsql-general
On Sat, Mar 03, 2007 at 16:46:45 -0800,
  Timasmith <timasmith@hotmail.com> wrote:
> On Mar 3, 7:12 pm, b...@wolff.to (Bruno Wolff III) wrote:
> > On Thu, Mar 01, 2007 at 06:16:02 -0800,
> >  Timasmith<timasm...@hotmail.com> wrote:
> >
> > > create view myview as
> > > select rownum, t1.field, t2.field
> > > from tableOne t1, tableTwo t2
> > > where t1.key = t2.fkey
>
>
> Never heard of a 'join key' but that sounds very promising.  How do I
> select it?
>

The join key would be t1.key or t2.fkey from your example. However there
may be multiple rows returned with the same value depending on what you
are joining. If that is the case you, should be able to use the primary
keys of the underlying tables to make a new candidate key for the joined
rows.

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

Предыдущее
От: Vincenzo Romano
Дата:
Сообщение: Re: psql client quits after 1st command
Следующее
От: "senges"
Дата:
Сообщение: COPY form stdin and file