I am wondering how or/and works?
For example if I want to get all rows where display = 1
I can just do WHERE tablename.display = 1
and i
in all SQL servers, AND takes precedence over OR, so just remember to put brackets around your ORs:
select * from tablename
where (display = 1 or display = 2)
and (content like "%hello world%"
or tags like "%hello world%"
or title = "%hello world%")
btw (display = 1 or display = 2) is equivalent to display in (1, 2).