MySQL中的分隔符?
+---------------------+
| YourDateTime |
+---------------------+
| 2018-12-07 22:30:18 |
| 2018-12-03 22:30:31 |
| 2018-12-02 22:30:41 |
| 2018-12-01 22:30:56 |
| 2018-12-03 22:31:04 |
+---------------------+
5 rows in set (0.00 sec)
分隔符关键字是MySQL客户端的一种函数。下面是使用分隔符调用上述表的分隔符演示:
mysql> delimiter //
mysql> create procedure DisplayALL()
−> begin
−> select *from GetRecordsFromNow;
−> end
−> //
Query OK, 0 rows affected (0.40 sec)
mysql> delimiter ;
mysql> call DisplayALL();
+---------------------+
| YourDateTime |
+---------------------+
| 2018-12-07 22:30:18 |
| 2018-12-03 22:30:31 |
| 2018-12-02 22:30:41 |
| 2018-12-01 22:30:56 |
| 2018-12-03 22:31:04 |
+---------------------+
5 rows in set (0.07 sec)
Query OK, 0 rows affected (0.10 sec)
阅读更多:MySQL 教程