在Linux中通过命令行截断表 [英] truncate table via command line in Linux

查看:51
本文介绍了在Linux中通过命令行截断表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用mysqldump命令截断我的db表之一,以便可以将该命令放在sh文件中以便每天执行.有人知道这个命令吗?预先感谢

I want to truncate one of my db table using mysqldump command so that I can place that command in sh file for executing it on daily basis. Do any one know about this command? Thanks in advance

推荐答案

您可以使用mysql命令行客户端来实现

You can use mysql command line client to do it

mysql -h dbserver_hostname -e "truncate table schema_name.table_name"

这篇关于在Linux中通过命令行截断表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆