select
*
from
`myTable`
where
`colA` <> 1 and
`ColB` <> 1
This will work for you only if the colA
and colB
are NOT NULL
. If there are rows with colA = NULL
or colB = NULL
you have to change the condition in your request.
select
*
from
`myTable`
where
(`colA` <> 1 or `colA` is null) and
(`colB` <> 1 or `colB` is null)
Of course it depends on if you want the rows with NULL
values, but many people forget about this.
Here is SQL Fiddle example http://www.sqlfiddle.com/#!2/ea797/2