- 1、本文档共30页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Oracle存储过程总结(一、基本应用)(Summary of Oracle stored procedure (i. basic application))
Oracle存储过程总结(一、基本应用)(Summary of Oracle stored procedure (i. basic application))
Establish stored procedures or functions
A stored procedure or function is a PL/SQL program in an ORACLE database that can be called directly or indirectly by the user. The main advantages of using stored procedures and functions are:
1. Effectiveness: in the client/server architecture, the client applies the requirement for SQL to the database server. As the number of users increases, the SQL request increases continuously, making the network quickly become a running bottleneck. Use stored procedures can make the running performance is a significant improvement, because of a call to the process of storage, which invokes the execution of multiple SQL statements in the server, thus reducing the network congestion.
Reusability: a PL/SQL program is written only once and can be used everywhere.
Portability: you can use stored procedures in any ORACLE database without considering platform issues.
4, maintainability: a stored procedure is used to complete a specific task, such as database trigger need to invoke the process are the same stored procedure, which can reduce the cost of software maintenance.
I. stored procedures
1. Establish the syntax of stored procedures.
CREATE [OR REPLACE] PROCEDURE name
(parameter 1,... participate n)] IS
[local variable declaration section]
The BEGIN
Executable part
[exception handling section]
The END;
Note: the OR REPLACE option is to override this process when this stored procedure exists.
The parameter part and the procedure definition are the same.
Example: define a stored procedure to delete the student record specified by the student table in the students table.
CREATE OR REPLACE PROCEDURE DELE
(STUID VARCHAR2) IS
The BEGIN
The DELETE FROM STUDENTS
WHERE STU_ID = STUID;
The END;
2. Call the stored procedure
Method: EXECUTE stored procedure name (parameter 1, parameter n);
Note: the type of parameter 1 to the parameter n must be consistent with the type
您可能关注的文档
- 2010年台湾世界杯国际少林武术大赛规程(浙江)(Taiwan World Cup 2010 international shaolin wushu competition procedure (zhejiang)).doc
- 2010年市司法行政工作计划(2010 municipal judicial administrative work plan).doc
- 2010年春期《高层建筑施工》课程期末考试试题(The final exam of high-rise building construction in spring 2010).doc
- 2010年普通高等学校招生全国统一考试 语文 真题卷(湖北卷)(2010 national unified examination of students' national standardized test (hubei volume)).doc
- 2010护士资格考试专业实践题目(2010 nurse qualification examination professional practice title).doc
- 2010造价师技术与计量(超精华)4(2010 cost division technology and measurement (superessence) 4).doc
- 2010驾照理论考试模拟题(Test simulation of driver's license in 2010).doc
- 2010经济员铁路运输(2010 economic worker rail transport).doc
- 2011-2012学年度第一学期七年级期中考试试卷(The first semester of the 2011-2012 academic year).doc
- 2011《管理与法规》91道真题+答案(Management and regulation 91).doc
文档评论(0)