We use stored procedure because it may or may not return value but function must return a value.
We have first change delimiter as // to mark end of strored procedure
Then write stored procedure and then change delimiter as ;
after that call procedure to display records from tables.
mysql>DELIMITER //
mysql>CREATE PROCEDURE simple()
BEGIN
SELECT day, customerName, customerAddress ,customerPhone, ID, countOfWorkers,equipment, totalHours, price FROM Work,Customer ORDER BY FIELD(day,'M','T','W','H','F');
END//
mysql>DELIMITER ;
mysql>call simple();
##Relation Work: workld customerName totalHours jobCompleted equipment countOfWorkers day price Dog True hammer 100 Cat 2...