一、Stored procedure建立temporary table+While迴圈範例
delimiter $$ CREATE PROCEDURE myFunction() BEGIN --定義變數i並給予初始值 DECLARE i INT DEFAULT 1;
--建立temporary table CREATE TEMPORARY TABLE ascii_chart (ascii_code int, ascii_char CHAR(1));
--採用while…do…end while迴圈 |