關於之間的區別...瞭解,Postgres的查詢
select * from table_a where id != 30 and name != 'Kevin';
和
select * from table_a where id != 30 or name != 'Kevin';
首先一個手段,"select all rows from table_a where the id is not 30 and the name is not Kevin"
。
因此{30,'Bill'}的{Id,Name}行將從此第一個查詢中返回。
但是,第二個意思是,"select all rows from table_a where the id is not 30 or the name is not 'Kevin'"
。
因此,從第二個查詢返回上述{30,'Bill'}將而不是。
是嗎?
謝謝,@Erwin。 –