▼  Site Navigation Main Articles Search  ▼  Anime + Manga Anime Reviews Anime Characters Gallery Screenshots Manga Reviews  ▼  Misc News Links to Webcomics Bible Quotes About Older Musings
site version 7.3
MySQL –– Operators Shorthand
written by: admin


Date Written: 4/19/12 Last Updated: 9/22/12

SELECT * FROM table WHERE col != 'this' AND col != 'that'

can be simplified as:

SELECT * FROM table WHERE col NOT IN ('this','that')

Conversely:

SELECT * FROM table WHERE col = 'this' OR col = 'that'

can be simplified as:

SELECT * FROM table WHERE col IN ('this','that')

These were the only two shorthand functions I could find. ref

TAGS: mysql
copyright 2005–2021