关于存储过程的基本语法是:
-- The REPLACE keyword is optional. Without it the CREATE statement
-- will fail if there there is already a procedure with the same name
CREATE [OR REPLACE] PROCEDURE procedure_name AS|IS
-- Variable declarations
BEGIN
-- Stored procedure body
-- Optional exception block
[EXCEPTION]
-- Exception handlers
END [procedure_name];
/
-- The procedure_name after the END statement is optional, used
-- mostly for readability
的编程语言是PL/SQL默认,但Oracle还允许你用Java编写存储过程。您也可以通过创建外部过程来调用外部C代码(或任何可以生成C链接对象库的语言),这些外部过程引用操作系统中的共享库。
PL/SQL类似于pascal和Delphi。它基于以帕斯卡为基础的Ada语言。 PL代表“程序语言”,但它也允许面向对象的编程范例。
要获得更完整的语法参考,我特别喜欢关于语法和用法提示的PSOUG(http://psoug.org)参考库。这里有很好的起动两个环节:
http://psoug.org/definition/procedure.htm
http://psoug.org/reference/procedures.html
很简单实在的,我是从我的目标只有几英寸远。感谢您的指导。 – Alessandro 2009-08-26 08:55:07