MySQL语句之or/and

canca9年前 (2017-03-23)700
在where中可以包含任意数目的and和or操作符,在没有任何其他符号的时候,例如括号,SQL会首先执行and条件,然后才执行or语句 eg.    select * from table where id=1 or id=2 and price>=10; 这条语…