mysql 中eq_表达式中的运算符EQ NE GT GE LT LE…..
EQ NE GT GE LT LE
GT=Great Than >
EQ=Equal =
GE=Great and Equal >=
NE=Not Equal <>
//等運算符,如果運算符兩邊相同則返回真,否則返回假;
NE(Not Equal to)
//不等運算符,如果運算符兩邊不等則返回真,否則返回假;
GE(Greater than or equal to)
//大于等于運算符,如果運算符兩邊左邊大于等于右邊則返回真,否則返回假;
GT(Greater than)
//大于運算符,如果運算符兩邊左邊大于右邊則返回真,否則返回假;
LE(Less than or equal to)
//小于等于運算符,如果運算符兩邊左邊小于等于右邊則返回真,否則返回假;
LT(Less than)
//小于運算符,如果運算符兩邊左邊大于右邊則返回真,否則返回假;
類別 運算符
算術(shù)運算符 + 、 - 、 * 、 / (或 div )和 % (或 mod )
關(guān)系運算符 == (或 eq )、 != (或 ne )、 < (或 lt )、 > (或 gt )、 <= (或 le )和 >= (或 ge )
邏輯運算符 && (或 and )、 || (或 or )和 ! (或 not )
驗證運算符 empty
參考及引用
7.2. String Comparison Operators
In order to compare for string equality, or if one string is alphabetically bigger than another, you can use the six string comparison operators. Here are the string operators together with the numerical operators they correspond too:
String Operator
Numerical Operator
eq
==
ne
!=
gt
>
lt
<
ge
>=
le
<=
Notice that the string operators are built from the initials of their abbreviated names. (E.g: eq = equal, gt = greater than). Perl’s string comparison is case-sensitive. If you want a case insensitive string comparison, use thelc function to convert the strings to lowercase beforehand.
Example:
print "Please enter your private name:\n";
$name = <>;
chomp($name);
if (lc($name) eq "rachel")
{
print "Your name is Rachel!\n";
}
else
{
print "Your name is not Rachel!\n";
}
總結(jié)
以上是生活随笔為你收集整理的mysql 中eq_表达式中的运算符EQ NE GT GE LT LE…..的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql1577_使用Navicat
- 下一篇: 树莓派3 mysql端口_树莓派3 之