MySQL: Difference between revisions

From Anthony Pastor Wiki Notes - Verba volant, scripta manent
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:
SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES where TABLE_SCHEMA = 'MYDB' AND ENGINE IS NOT NULL ORDER BY ENGINE;
SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES where TABLE_SCHEMA = 'MYDB' AND ENGINE IS NOT NULL ORDER BY ENGINE;
</syntaxhighlight>
</syntaxhighlight>


* Change engine for a MYTABLE table:
* Change engine for a MYTABLE table:

Revision as of 10:53, 16 April 2015

  • List MySQL tables engines for a MYDB database:
SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES where TABLE_SCHEMA = 'MYDB' AND ENGINE IS NOT NULL ORDER BY ENGINE;


  • Change engine for a MYTABLE table:
ALTER TABLE MYTABLE ENGINE=InnoDB;

OR

ALTER TABLE MYTABLE ENGINE=MyISAM;