DELIMITER //
CREATE PROCEDURE GetOfficeByCountry(IN countryName VARCHAR(255))
BEGIN
SELECT city, phone
FROM offices
WHERE country = countryName;
END //
DELIMITER ;
CALL GetOfficeByCountry('USA')
CALL GetOfficeByCountry(‘France’)
/***********************************************************/
NO PARAMETER
DELIMITER $$
DROP PROCEDURE UPDATE_TEMP_SUMMARY_VIEW01 $$
CREATE PROCEDURE UPDATE_TEMP_SUMMARY_VIEW01()
BEGIN
truncate table TEMP_SUMMARY_VIEW01;
insert ignore into TEMP_SUMMARY_VIEW01 select * from SOINVPOSUMMARY;
END ;
$$
DELIMITER ;
沒有留言:
張貼留言