Re: UNION and PROJECT in ISQL
Posted in 1995
In article <kcjDBBKzB.CKK@netcom.com>, kcj@netcom.com says...
>My question is: are there the standard relational operators available in
>these products? Specifically I need UNION and JOIN, but I can't see
>reference to them at all.
There is no JOIN operator in SQL. Instead of joining
a.primary_key=b.secondary_key, or a.field1=a.field2, you just add it to
the "where" clause, something like "where a.field1 = b.field1 and
a.field2 = b.field2 and a.field3 = b.field3" (and so forth).
The union operator is certainly not described very well (at least in the
Informix Guide to SQL that I'm looking at.) The place to look for a
halfway decent description is probably the Tutorial manual; it basically
goes something as follows:
select field1, field2, field3 from table where {where conditions}
union
select field1, field2, field3 from table where {other where conditions}
and returns the union of the two select statements.
--
William Harris (Standard disclaimers)
CARS Information Systems http://www.carsinfo.com/~william/
4000 Executive Park Drive
Cincinnati, OH (USA) 45241