When I run the following code, it always returns a NULL value for the two variables inside the loop. SET @c = ''; SET @i = 4; REPEAT SET @c = CONCAT( ' -> ', ( SELECT name FROM c WHERE id = @i ), @c ); SET @i = ( SELE...