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.
refTAGS: mysql