Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!linac!midway!mimsy!nocusuhs!yoshi From: yoshi@nocusuhs.nnmc.navy.mil (Dojun Yoshikami) Newsgroups: comp.databases Subject: SQL Differences Question Keywords: set differences, SQL Message-ID: <1991Apr17.133725.25499@nocusuhs.nnmc.navy.mil> Date: 17 Apr 91 13:37:25 GMT Organization: National Naval Medical Center Lines: 26 Question for all you SQL'er's, How can one get the difference between two sets? I have two tables (s, and t) as follows: S: T: ----- ----- 1 1 2 3 3 7 What I would like to get is all S's that are not in T, i.e. 2 in this example. I know there is a set algebraic operator (difference) to get this, but I'm not sure how to get this in SQL. (There's gotta be a way to do this! It's a relational algebraic operation which should be easily done!) DY ;-) =-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= D M Yoshikami :-) ;-) :-) | Internet: yoshikami@usuhsb.ucc.usuhs.nnmc.navy.mil May the Forth be with you! | Bitnet : yoshikami@usuhsb.bitnet *** !!xob X*NU V METSYS T&TA eht ni renosirp dleh gnieb m`I !pleH !pleH *** =-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=