Re: please give me select sqls examples to distinct these!

Поиск
Список
Период
Сортировка
Искать
От
David G. Johnston
Тема
Re: please give me select sqls examples to distinct these!
Дата
Msg-id
CAKFQuwauCTd7BzKnC6wDMpd+-OUOmVP4QPCcjzz3nFrsGXw6GA@mail.gmail.com
Ответ на
Список
Дерево обсуждения
please give me select sqls examples to distinct these! "jacktby@gmail.com" <jacktby@gmail.com>
Re: Re: please give me select sqls examples to distinct these! "jacktby@gmail.com" <jacktby@gmail.com>
Re: please give me select sqls examples to distinct these! Rob Sargent <robjsargent@gmail.com>
Re: please give me select sqls examples to distinct these! "David G. Johnston" <david.g.johnston@gmail.com>
Re: please give me select sqls examples to distinct these! "David G. Johnston" <david.g.johnston@gmail.com>
Re: please give me select sqls examples to distinct these! Rob Sargent <robjsargent@gmail.com>
Re: please give me select sqls examples to distinct these! "David G. Johnston" <david.g.johnston@gmail.com>
Re: please give me select sqls examples to distinct these! Rob Sargent <robjsargent@gmail.com>
On Tue, Oct 25, 2022 at 8:56 AM Rob Sargent <robjsargent@gmail.com> wrote:
On 10/25/22 09:24, David G. Johnston wrote:
On Tue, Oct 25, 2022 at 8:22 AM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Tue, Oct 25, 2022 at 7:06 AM Rob Sargent <robjsargent@gmail.com> wrote:


2: select * from table join table b on Id = idb 



#2 is probably conceptually correct but in this context should be written as:


Actually, a join is NOT conceptually correct here - the output columns for "SELECT *" will be wrong.

David J.

OK.  TBH I thought this was the JOOQ list! Didn't notice the typedef.  So this is all about exact match "tables".

I suppose my #2 could be framed as
    select a* from table as a join table as b on a.<criteria> = b.<criteria>
to be a functional equivalent of INTERSECT?

SELECT DISTINCT a.* 

David J.
В списке pgsql-general по дате отправления
От: Rob Sargent
Дата:
От: Rob Sargent
Дата:
FAQ