Re: Union query
Posted in 1998
Girish Kagrana wrote: > > Hi all, > > myself I got ans., the ans. is as follows > for query-2 if u give 'UNION' only it will remove duplicate rows > that is why 2 rows are retrived, if u say UNION ALL it will retrived > 6 rows (i.e. all rows) > > if other than this expl. then let me know. No, you are quite right. The UNION operator will by default remove duplicate rows. As you say, you must use the UNION ALL operator to include all rows including duplicates. And thanks for letting us know you had answered your own question. :-) Cheers, -- Mark. +----------------------------------------------------------+-----------+ |Mark D. Stock - Informix SA http://www.informix.com |//////// /| |mailto:mdstock@informix.com http://www.iiug.org |///// / //| | +-----------------------------------+//// / ///| | Tel: +27 11 807 0313 |If it's slow, the users complain. |/// / ////| | Fax: +27 11 807 2594 |If it's fast, the users keep quiet.|// / /////| |Cell: +27 83 250 2325 |Therefore, "No news: travels fast"!|/ ////////| +----------------------+-----------------------------------+-----------+