删除要求:
删除数据库test中以'test_'开头的表,并排除test_a,test_b,test_c
SELECT CONCAT('DROP TABLE ',TABLE_NAME,';') FROM information_schema.TABLES WHERE TABLE_SCHEMA='test' and TABLE_NAME like 'test_%' and TABLE_NAME not in('test_a','test_b','test_c') INTO OUTFILE 'd:/del_test.sql';