本文共 945 字,大约阅读时间需要 3 分钟。
字符串
mysql> SELECT "hello", "'hello'", "''hello''", "hel""lo", "\"hello"; +-------+---------+-----------+--------+--------+ | hello | 'hello' | ''hello'' | hel"lo | "hello | +-------+---------+-----------+--------+--------+ | hello | 'hello' | ''hello'' | hel"lo | "hello | +-------+---------+-----------+--------+--------+ 1 row in set (0.01 sec)mysql> SELECT 'This\nIs\nFour\nLines';
+--------------------+ | This Is Four Lines | +--------------------+ | This Is Four Lines | +--------------------+ 1 row in set (0.00 sec)mysql> SELECT 'This\nIs\nFour\nLines' line;
+--------------------+ | line | +--------------------+ | This Is Four Lines | +--------------------+ 1 row in set (0.01 sec)mysql> SELECT 'disappearing\ backslash';
+------------------------+ | disappearing backslash | +------------------------+ | disappearing backslash | +------------------------+ 1 row in set (0.01 sec)mysql> commit;
Query OK, 0 rows affected (0.00 sec)转载地址:http://behca.baihongyu.com/