标签:
通过查询INFORMATION_SCHEMA.TABLES查询数据库表的结构信息
SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME =’table_name’ and TABLE_SCHEMA = ‘database_name‘
在查询语句后面加上into outfile 文件路径,可将查询结果导出到文件,文件格式自定
SELECT CONCAT(‘delete from ‘,TABLE_NAME,‘;‘) FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME like ‘dep_system_doc%‘ and TABLE_SCHEMA = ‘acm_gaj‘
into outfile "d://clear_dep_system_doc_.xls";
标签:
原文地址:http://www.cnblogs.com/cocoat/p/4923074.html