Taking out many of the redundant parens that are not important, so we can strip those. Then some slight formatting for readability.
select
@a as ThisIsTheFinalAnswer
from
( select @a := 0x00,
( select @a
from information_schema.schemata
where @a in @a: = concat(@a, schema_name,'<br>')
)
)
So, the first part of the from (select @a := 0x00
is initializing an in-line SQL variable called @a. the @ is used to declare a variable. The := is the assignment of whatever the equation answer is on the RIGHT gets put into the variable on the LEFT. So the initialization of the variable is just to GET the variable declared vs a stored procedure where you explicitly DECLARE a variable of a given type, then set a value to it.
Then the tricky one is the where @a in...
In this case, it has to explicitly compute the right side which takes and concatenates whatever the existing @a variable, PLUS the schema_name PLUS a
(such as for HTML formatting) and ASSIGNS that back into the @a because of its :=. That is then applied to the WHERE clause of @a IN (the result of the @a := component).
When finished, the final @a is returned to the final output.