INFORMATION_SCHEMA provides access to database metadata, (data dictionary or database catalog) such as the name of a database or table, the data type of a column, or access privileges. It is the information database, the place that stores information about all the other databases that the MySQL server maintains.
Here is an example of a statement that retrieves information from INFORMATION_SCHEMA.
mysql>
SELECT table_name, table_type FROM information_schema.tables WHERE table_schema = ‘yourdatabasename ORDER BY table_name DESC;
You can use stored procedure to do the same thing.
mysql>
DROP PROCEDURE GetAlltables;
DELIMITER /
CREATE PROCEDURE GetAlltables()
BEGIN
SELECT table_name FROM information_schema.tables WHERE table_schema = ‘yourdatabasename’ ORDER BY table_name DESC;
END /
DELIMITER ;
Then call
CALL GetAlltables();