Home > Database > Mysql Tutorial > 批量删除有规则的表_MySQL

批量删除有规则的表_MySQL

WBOY
Release: 2016-06-01 13:28:20
Original
1073 people have browsed it

bitsCN.com


批量删除有规则的表

 

echo "select concat('drop table ',  table_name ,';') from tables where table_schema='hadoop_xxxx' and table_name like 'ad_first_url_%';" | mysql information_schema | sed -n '2,$p' | mysql hadoop_xxxx
Copy after login

 


bitsCN.com
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template