Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Is relational theory irrelevant?

Re: Is relational theory irrelevant?

From: Carl C. Federl <cfederl_at_yahoo.com>
Date: 12 Nov 2003 14:00:42 -0800
Message-ID: <db76e830.0311121400.7a548bb9@posting.google.com>


Christopher Browne <cbbrowne_at_acm.org> wrote in message news:<borj63$1i4fo4$1_at_ID-125932.news.uni-berlin.de>...
> A long time ago, in a galaxy far, far away, Lauri Pietarinen <lauri.pietarinen_at_atbusiness.com> wrote:
> > OK, but is
> >
> > select top 5 * from (
> > select * from emp order by sal
> > )
> >
> > legal SQL now a'days?
> >
> > Is it supported in products?
>
> No, it is not 'legal SQL.'
>
> It is a proprietary extension used by one vendor.
The SQL standard now includes the concept of windowing functions in addition to the grouping functions. The SQL statement to Rank by salary within each department would be on the order of:

select employeeId , employeeName, SalaryAmt,DepartmentId , rank() over (partition by departmentId order by salaryAmt) as SalaryRank
from employees

The windowing functions are support by Oracle and DB2 but not by Microsoft SQL Server. Received on Wed Nov 12 2003 - 16:00:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US