Using:
x=all(y,z)
instead
x=y and y=z
The above saves 1 keystroke (1/11 = 9% - not really).
If the column names are larger, then this gives a big savings:
This is a length of 35 characters:
column1=column2 AND column2=column3
so far this one is only 28
column1=ALL(column2,column3)
But for this (95 characters):
column1=column2 AND column2=column3 AND column3=column4 AND column4=column5 AND column5=column6
you get 43/95 = almost 50% savings
column1=all(column2,column3,column4,column5,column6)
Operator
ALL
is part of ANSII SQL, it is supported by most databases (Mysql, Postgresql, SQLServer, etc.
http://www.w3resource.com/sql/special-operators/sql_all.php
A simple test case showing how it works:
create table t( x int, y int, z int ); insert all into t values( 1,1,1) into t values(1,2,2) into t values(1,1,2) into t values(1,2,1) select 1 from dual; select * from t where x = all(y,z); XYZ