Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- sql make inverse of a select
January 12, 2009, 3:25 pm
rate this thread
Re: sql make inverse of a select
Well, going by the statement you use now, all of the 'nn' numbers have a
'zz' value of '2', so: SELECT nn FROM tab WHERE ss=1 AND zz=2 would
get you 14, 15, 16 and 26. Of course, that might not ultimately work
for all of your data, and it probably depends on your script and the
rest of the logic. Also, you probably want to ask this in the MySQL
group and/or the group of the language you run this statement in (if
you're not just using a command line and mysql itself -- which is fine,
if that's what you're doing).
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!