mysql>SELECT LENGTH("boo
m"); //5 (I want 4)
如何在不增加字符数值的情况下翻译下一行的字词?
答案 0 :(得分:1)
这样做:
mysql> SELECT LENGTH("boo"
-> "m");
+-------------------+
| LENGTH("boo"
"m") |
+-------------------+
| 4 |
+-------------------+
1 row in set (0.00 sec)
要理解这一点,请参阅此示例:
mysql> SELECT "boo" "m";
+------+
| boo |
+------+
| boom |
+------+
1 row in set (0.00 sec)
您可以在许多编程语言中看到相同的行为。