for x in `mysql -N -ppassword database_name -e "show tables;"`; do echo "truncate table ${x} ;" | mysql -N -ppassword database_name ; done
Created
February 16, 2013 08:29
-
-
Save onigra/4966081 to your computer and use it in GitHub Desktop.
mysqlのスキーマにある各テーブルに対してまとめてごにょごにょするワンライナー
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment