Re: OT - select + must have from - sql standard syntax?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: OT - select + must have from - sql standard syntax?
Дата
Msg-id 87wtbkcqzh.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: OT - select + must have from - sql standard syntax?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: OT - select + must have from - sql standard syntax?  (Antoine <melser.anton@gmail.com>)
Re: OT - select + must have from - sql standard syntax?  ("Dave Dutcher" <dave@tridecap.com>)
Список pgsql-performance
Tom Lane <tgl@sss.pgh.pa.us> writes:

> The spec does require a FROM clause in SELECT (at least as of SQL99, did
> not check SQL2003).  However, it's clearly mighty useful to allow FROM
> to be omitted for simple compute-this-scalar-result problems.  You
> should respond to the Oracle guy that "SELECT whatever FROM dual" is not
> in the standard either (certainly the spec does not mention any such
> table).

Well you could always create a "dual", it was always just a regular table. We
used to joke about what would happen to Oracle if you inserted an extra row in
it...

Oracle used to always require FROM, if it has stopped requiring it then that's
new. I had heard it had special-cased dual in later versions to avoid the
table access overhead, I suspect these two changes are related.

--
greg

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Solaris shared_buffers anomaly?
Следующее
От: Antoine
Дата:
Сообщение: Re: OT - select + must have from - sql standard syntax?