Hawke Robinson writes:
> Ok, here's yet another simple one (I'm sure), that I can't find the
> answer to on the MySQL online docs:
> I'm wanting to do a NOT comparison, but I get a syntax error from MySQl
> when i do. What's the equivalent in MySQL?
> Here's a sample of what I'm trying:
> SHOW COLUMNS FROM GamerFinder WHERE Field NOT
> IN('ID','Email','PhoneNum');
> I also tried:
> SHOW COLUMNS FROM GamerFinder WHERE Field != 'ID';
> Same problem. Any suggestions are most appreciated.
> Thanks,
> -Hawke
>
> --
> -Hawke www.hawkes-haven.com
> CNA, MCP+I, MCSE, AS in CS, and more on the way...
> Sun Certified Solaris Admin & Java Programmer, CNE+I, MCSE+I, CCNA.
> ICQ# 3218959
>
>
Hi!
NOT IN can be used in any query.
But in SHOW COLUMNS you can use only LIKE clause.
Sinisa
+----------------------------------------------------------------------+
| TcX ____ __ _____ _____ ___ == mysql@stripped |
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic |
| /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sinisa@stripped|
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+----------------------------------------------------------------------+