Why is mySQL output not procedurally consistent with source code input? I've assumed the order of INPUT statements would be output in the order they were declared and processed in the source code. I need help understanding what I observe in this context and "if possible" or "if feasable" be told how to ensure output is mapped to the order of the source code input when running the following example script... 

DROP PROCEDURE IF EXISTS csgRunLoop;
DROP TABLE IF EXISTS testUUID;
CREATE TABLE testUUID (id binary(16) PRIMARY KEY);

BEGIN
DECLARE x, y INT DEFAULT 1;

--  WHILE x  &lt;= 3 DO
--  INSERT INTO testUUID VALUES(UUID_TO_BIN(UUID()));
--  SET  x = x + 1; 
--  END WHILE;

-- Move the two INSERT statments below WHILE loop or run here above WHILE loop 
-- and the output is not consistent with the order the statements were declared
   INSERT INTO testUUID VALUES(UUID_TO_BIN('d6c03d84-2eed-4f15-b681-90fe627fcacf'));
   INSERT INTO testUUID VALUES(UUID_TO_BIN('d6c03d84-2eed-4f15-b681-90fe627fcacf', true));

   WHILE y  &lt;= 3 DO
   INSERT INTO testUUID VALUES(UUID_TO_BIN(UUID(), true));
   SET  y = y + 1; 
   END WHILE;

END$$
DELIMITER ;

CALL csgRunLoop();

-- time shifted
SELECT BIN_TO_UUID(id) FROM testUUID;

-- untime shifted
--SELECT BIN_TO_UUID(id, true) FROM testUUID WHERE id LIKE('%');
Databases have no concept of "order".

This is so that they can handle millions, billions, and trillions of rows of data without worrying about "order".

If you want output in a specific order, you MUST specify an ORDER BY clause.

This means you need a column you can ORDER BY.

On such column could be an Identity column.  Check your RDBMS documentation for any potential out-of-order possibilities. (Eg oracle RAC Sequence)

Another method is to use a CREATED_ONcolumn.  This a date+time column with sub-second resolution.