CREATE PROCEDURE LOOPSWHILE()
LANGUAGE SQL
BEGIN
  DECLARE i INT DEFAULT 1024;
  WHILE i > 0 DO
    SELECT i;
    SET i = i / 2;
  END WHILE;
END
