Re: wildcard alias

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: wildcard alias
Дата
Msg-id 20061110223422.GC18137@svana.org
обсуждение исходный текст
Ответ на wildcard alias  (Matthew Terenzio <matt@jobsforge.com>)
Ответы Re: wildcard alias  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-general
I don't know what your query or aliases have to do with joins, but if
you want to join two tables on all fields with the same name, you can
do a NATURAL JOIN.

Have a nice day,

On Fri, Nov 10, 2006 at 05:17:12PM -0500, Matthew Terenzio wrote:
>
> I suppose I should have named things differently but is there a way to
> join two tables with a bunch of identical column names and rather than
> explicitly alias each column just use some sort of wildcard like:
>
> SELECT tablename.* AS  alias.*
>
> OR do I have to name each column like:
>
> columnname as alias
>
> Thanks much.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Matthew Terenzio
Дата:
Сообщение: wildcard alias
Следующее
От: "George Pavlov"
Дата:
Сообщение: apparent wraparound