dbTalk Databases Forums  

Derived tables?

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Derived tables? in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
CSN
 
Posts: n/a

Default Derived tables? - 10-28-2004 , 04:08 PM






Just wondering - does PG support derived tables? I'm
not really sure what the difference is between them
and subqueries.

http://www.mysql.com/news-and-events...e_2004_32.html
http://www.sqlservercentral.com/colu...intversion.asp



__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: Derived tables? - 10-28-2004 , 05:39 PM






CSN <cool_screen_name90001 (AT) yahoo (DOT) com> writes:
Quote:
Just wondering - does PG support derived tables? I'm
not really sure what the difference is between them
and subqueries.
None whatever, at least using the definition offered by your second
reference:

A derived table is a select statement inside parenthesis, with
an alias, used as a table in a join.

The SQL92 spec appears to use the phrase in exactly this way (except
they don't require the construct to appear in a join, as indeed we don't
either; the most correct explanation would probably be "used as a table
in a FROM clause").

MySQL often has their own spin on such terms ;-). I'm not sure what
MySQL 4.1 actually supports in this line. But I'll make a side bet that
they don't yet optimize them as well as we do ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.