转 mysql 存储过程初探

时间:2022-03-03 03:19:15

 

 

https://www.cnblogs.com/qmfsun/p/4838032.html
MySQL命令执行sql文件的两种方法


https://www.cnblogs.com/mark-chan/p/5384139.html

CREATE PROCEDURE GreetWorld() SELECT CONCAT(@greeting,‘ World‘);
SET @greeting=‘Hello‘;
CALL GreetWorld();

 

https://blog.csdn.net/shaochenshuo/article/details/49890947
mysql中使用tee实现类似oracle spool功能

 

SELECT
FROM_UNIXTIME(his.clock, "%Y-%m-%d") AS DATE,
his.VALUE AS traffic,
(a.key_) AS NAME,
a.name AS db_name,
a.host AS HOST
FROM
history his,(SELECT i.key_,i.itemid,h.hostid,h.host,h.name FROM items i,HOSTS h
WHERE h.hostid=i.hostid AND i.key_ LIKE ‘%size