Re: building sets in SQL92

From: James Chapman <Jim.Chapman_at_nospam.elsegundoca.ncr.com>
Date: Mon, 4 Jun 2001 10:53:55 -0700
Message-ID: <3b1bcb35$1_at_rpc1284.daytonoh.ncr.com>


Sure. The syntax is standard SQL. It does depend on an extra-syntactical assumption -- that there exists some table named DUAL, and that it contains exactly one row. Some implementations may have such a table by default, but,
of course, it would be trivial to satisfy the assumption in any standard SQL implementation:

create table DUAL (dummy integer);
insert into DUAL values(1);

"Sam Staton" <sam.staton_at_bigfoot.com> wrote in message news:bc0ght07b81h6dfap0sa7s6raklac50u90_at_4ax.com...
> >select 'Boston' as CITY from DUAL
> >union
> >select 'Atlanta' as CITY from DUAL
> >union
> >select 'Columbia' as CITY from DUAL
>
> This works in OCELOT, which markets itself as 'the only Database
> Management System (DBMS) that supports the full ANSI / ISO SQL
> Standard (1992)' plus some of SQL 99 'and absolutely no deviations or
> extensions'. If you believe them...
> (http://ourworld.compuserve.com/homepages/OCELOTSQL/).
>
> Incidentally, I know the official SQL standards from 1989 onwards are
> not freely available 'for copyright reasons' (something stupid like
> $18 for a chapter of SQL99 in PDF!) . However, I cannot get the 1986
> standard from http://case50.ncsl.nist.gov/sql-86, which loads of
> webpages seem to point to. It keeps asking for a password - anonymous
> doesn't work - does anybody know? Is it supposed to be restricted? The
> web pages I've been to imply not.
>
> It seems stupid that the standards documents are not freely available.
> Surely if they were then we would program more by the standard, for
> more compatible code, instead of by the manufacturer's language guide.
Received on Mon Jun 04 2001 - 19:53:55 CEST

Original text of this message