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
CAKFQuwYvNChGg0-b+9siK0rNGj8Da-RAj3g9iy2kW=-rY1Uu8A@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 7:06 AM Rob Sargent <robjsargent@gmail.com> wrote:
On Oct 25, 2022, at 7:55 AM, jacktby@gmail.com wrote:typedef enum SetOperation{SETOP_NONE = 0,SETOP_UNION,SETOP_INTERSECT,SETOP_EXCEPT} SetOperation;Please use just text.What ‘dialect’ are using? In Postgres0: select * from table1: select * from table union select * from table is same shape2: select * from table join table b on Id = idb3: select * from table except select * from tableb
#2 is probably conceptually correct but in this context should be written as:
SELECT *
FROM table
INTERSECT
SELECT *
FROM table
Distinct is a default modifier, one can specify ALL if that isn't desired.
This is trivially answered by the documentation as well:
David J.
В списке pgsql-general по дате отправления
От: David G. Johnston
Дата: