Oracle Database Operations (14) stored procedures in pl/SQL programming

Source: Internet
Author: User
Stored Procedure: More Oracle documents, video tutorial: 2.taobao.comitem.htm? Id42922011874spm686.1000925.0.0. How does ZVvkz6mt call the stored procedure in Java: function: More Oracle Data, video tutorial: 2.taobao.comitem.htm? Id42922011874spm686.1000925.0.0. ZVvk

Stored Procedure: More Oracle Data, video tutorial: http://2.taobao.com/item.htm? Id = 42922011874spm = 686.1000925.0.0.ZVvkz6mt = How to call the stored procedure in Java: function: More Oracle information, video tutorial: http://2.taobao.com/item.htm? Id = 42922011874spm = 686.1000925.0.0.ZVvk

Stored Procedure:


More Oracle documents and video Tutorials:

Http://2.taobao.com/item.htm? Id = 42922011874 & spm = 686.1000925.0.0.ZVvkz6 & mt =



How to call a stored procedure in Java:


Function:

More Oracle documents and video Tutorials:

Http://2.taobao.com/item.htm? Id = 42922011874 & spm = 686.1000925.0.0.ZVvkz6 & mt =


Instance:

Enter the employee's name and return the employee's annual salary.

Create function sp_fun2 (spName varchar2) return

Number is yearSal number (7, 2 );

-- Execution part

Select sal * 12 + nvl (comm, 0) * 12 into yearSal from emp where ename = spName;

Return yearSal;

End;

How to call a function:

Var abc number;

Call sp_fun2 ('Scott ') into: abc;

Package:




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.