利用MySQL客户端批量执行sql语句

2014-11-24 18:17:57 · 作者: · 浏览: 0

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> select * from x;
+------+------+------+------+------+
| a1 | a2 | a3 | b1 | b2 |
+------+------+------+------+------+
| 1 | 1 | 2 | 0 | 0 |
+------+------+------+------+------+
1 row in set (0.00 sec)


在OceanBase中,将sql语句写到my.sql文本文件中,然后用重定向命令将其批量导入到mysql客户端中执行即可。