13、mysql运算符
mysql主要有算数运算符、比较运算符、逻辑运算符、位运算符 1、算数运算符 + select 1+2; - select 1-2; * select 1* 2; / 或div select 1/2; or select 1 div 2; % 或 mod select 1%2; or select 1 mod 2; 2、比较运算符 = select 2=3; <> != select 2<>3; > select 2>3; < select 2<3; <= select 2<=3; >= select 2>=3 between select 5 between 0 and 10; not between select 5 not between 0 and 10; in select 5 in (1,2,3,4,5) not in select 5 not in (1,2,3,4,5) <=> 严格比较两个null值是否相等,两个操作码均为null时,值为1,当一个操作码为null时,值为0 select 1<=>2 ;select null<=>null; like select '123456' like '12%'; is null select null is null; is not null select 'a' is not null; regexp 或rlike