您的位置:首页 > 其它

如何快速比较查询结果是否一致_转叶大侠

2014-07-26 08:32 295 查看
如何快速比较查询结果是否一致

如何快速比较查询结果是否一致

(system@localhost) [tom]> pager md5sum -
PAGER set to 'md5sum -'
(system@localhost) [tom]> select * from users;
6004a48a825ef527b3f090290ba9f0c0  -
1 row in set (0.00 sec)

(system@localhost) [tom]> select * from users;
6004a48a825ef527b3f090290ba9f0c0  -

#将指令输出的内容保存在文件中..
(system@localhost) [tom]> pager cat > /tmp/log.txt
PAGER set to 'cat > /tmp/log.txt'
(system@localhost) [tom]> select now();
1 row in set (0.00 sec)

(system@localhost) [tom]> system cat /tmp/log.txt
+---------------------+
| now()               |
+---------------------+
| 2014-07-23 04:17:17 |
+---------------------+

#将指令输出的内容保存在文件中同时输出到屏幕
(system@localhost) [tom]> PAGER cat | tee /tmp/log.txt

#将指令输出的内容同时输出到屏幕
(system@localhost) [tom]> PAGER tee
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: