The modulus operator is more useful than it seems.
求模运算符的作用远不止如此。
SQL does not support the modulus operator on floating-point Numbers.
SQL不支持对浮点数字使用取模运算符。
An alternative is to use the format operator, %. When applied to integers, % is the modulus operator. But when the first operand is a string, % is the format operator.
另外一个方法就是用格式运算符,也就是百分号%。在用于整数的时候,百分号%是取余数的运算符。但当第一个运算对象是字符串的时候,百分号%就成了格式运算符了。
应用推荐