Re: [HACKERS] Reference Manual]
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] Reference Manual] |
Дата | |
Msg-id | 199803301525.KAA13181@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Reference Manual ("Jose' Soares Da Silva" <sferac@proxy.bazzanese.com>) |
Список | pgsql-hackers |
> 2. - Seems that optional ALL keyword of UNION doesn't work. > The following query prints always the same result with and without > the ALL clause. > > * UNION of two tables: > > mytable: yourtable: > id|name id|name > --+------ --+------ > 1|Smith 1|Soares > 2|Jones 2|Panini > 3|Soares > > > SELECT mytable.id, mytable.name > FROM mytable > WHERE mytable.name LIKE 'S%' > UNION > SELECT yourtable.id, yourtable.name > FROM yourtable > WHERE yourtable.name LIKE 'S%'; > > this is the result even if I don't specify ALL. > id|name > --+------ > 1|Smith > 1|Soares > 3|Soares The second column is duplicate, but the first is not. It looks at all columns to determine duplicates. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)
В списке pgsql-hackers по дате отправления: