Re: UNION and PROJECT in ISQL
Posted in 1995
kcj@netcom.com (Kate Juliff) wrote:
>
>I have all the Informix manuals and have purchased SE and
>ISQL. It's very confusing as the manuals have varying versions on them...
>4, 6 and 7.X. As well they have information on ESQL which I assume I
>don't have, having purchased SE and ISQL only.
>
>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.
>
>Thanks to everyone who helped on the PROMPT query.....
>
>--Kate
>
Sure !!
UNION Example:
SELECT col1, col2, col3
FROM table1
WHERE ....
UNION
SELECT col1, col2, col3
FROM table2
WHERE ...
JOIN Example:
SELECT table1.col1, table2.col1, table2.col2
FROM table1, table2
WHERE table1.col1 = table2.col2
AND .....
or
SELECT table1.col1, table1.col2
FROM table1
WHERE col1 IN
( SELECT table2.col1 FROM table2 WHERE ... )
Have fun !!
------------------------------------------------------------------------
* Rick Clark ( President & CEO ) Internet: rick@imagepro.com
* Imaging Business Consultants, Inc. AOL: rickjclark@aol.com
* San Jose, California 95124, USA.
* Phone: 408 369-9220
* Fax: 408 369-9223
------------------------------------------------------------------------