If there is a complicated query that I want to perform multiple times, is there a way to store it as an “alias”? For example, store:
SELECT
table_schema "Data Base Name",
SUM( data_length + index_length) / 1024 / 1024 "Data Base Size in MB"
FROM information_schema.TABLES
GROUP BY table_schema ;
as
GET_DB_SIZES
Is something like that possible???
Yes, create a
VIEW:Then you can: