Check the type of database engine
In MariaDB, I will introduce a SQL command to check the type of database engine.
I'm supposed to have InnoDB as the database engine for all my tables, but sometimes I make a mistake and some tables are MyISAM.
In such cases, it would be useful to be able to see the database engine on every table.
Check the type of database engine
A SQL command that checks the type of database engine.
You can see the type of database engine in the engine field of information_schema.tables.
select table_name, engine from information_schema.tables where table_schema = database () order by table_name ;
This is an example of the output result.
+ ----------------------- + -------- + | table_name | engine | + ----------------------- + -------- + book | InnoDB | | author | InnoDB | | publisher | InnoDB | + ----------------------- + -------- +
Change the database engine
If you want to change the database engine, use the "alter table change database engine" command.