Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!nrl-cmf!ukma!psuvm.bitnet!uh2 From: UH2@PSUVM.BITNET (Lee Sailer) Newsgroups: comp.databases Subject: Re: SQL question Message-ID: <34586UH2@PSUVM> Date: 25 Feb 88 14:01:13 GMT References: <34358UH2@PSUVM> <43005@sun.uucp> Organization: Penn Sate Erie--School of Business Lines: 24 In article <43005@sun.uucp>, rfm%urth@Sun.COM (Richard McAllister) says: > >In article <34358UH2@PSUVM> UH2@PSUVM.BITNET (Lee Sailer) writes: > >>This morning I am wondering, how do you do a simple relational UNION in SQL? >>That is, given two relations, R1 and R2, how do you create R3 that contains >>those tuples that are in either R1, R2, or both, assuming that R1 and R2 >>have the same attributes? > >You write > > SELECT * FROM R1 > UNION > SELECT * FROM R2 That is certainly straightforward enough, but still I was surprised. One of the characterisitcs of SQL, I thought, was that there are ONLY 4 operators, SELECT, INSERT, DELETE, and UPDATE. I figured that there would be some tricky way to use a SELECT to do a Union, Intersect, Difference, etc. So, how come it is said that SQL has only 4 operators, when obviously there are more? lee