进入mysql命令行模式: # mysql -uroot -ppwd 1.查看mysql提供什么存储引擎: mysql> show engines; 2.查看mysql当前提供的默认存储引擎: mysql> show variables like '%storage_engine%'; 3.显示数据库列表: mysql> show databases; 4.进入需要修改的数据库 mysql> use freeswitch; 5.列出FreeSWITCH库的所有表 mysql>
1.进入数据库 2.SELECT CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements FROM information_schema.tables AS tb WHERE table_schema = '数据库名' AND `ENGINE` = 'MyISAM' AND `TABLE_TYPE` = 'BASE TABLE' ORDER BY table_name DESC
INSTR方法: 1:查询TM不包括大学的所有结果集 SELECT TM, ID FROM X_1459307704859 WHERE instr(TM, '大学') = 0; 2:查询TM所有包含大学的所有结果集 SELECT TM, ID FROM X_1459307704859 WHERE instr(TM, '大学') > 0;