▶ msql
CREATE PROCEDURE GetCategories
AS
SELECT CategoryID,CategoryName, [Description]
FROM Categories
RETURN
▶ mysql
CREATE PROCEDURE GetCategories()
BEGIN
SELECT CategoryID, CategoryName, Description
FROM Categories ;
END;
▶ oracle
CREATE OR REPLACE PACKAGE TYPES
AS
TYPE CURSORTYPE IS REF CURSOR;
END;
CREATE or Replace PROCEDURE GetCategories
( CAT_CUR OUT TYPES.CURSORTYPE )
IS
BEGIN
OPEN cat_cur FOR
SELECT CategoryID, CategoryName, Description
FROM Categories ;
END ;
'MySQL > 저장프로시져' 카테고리의 다른 글
MySQL Prepared Statement (2) | 2014.03.25 |
---|