PLS-00103 during Oracle stored procedure: the sign '/' appears when the following is required :(

Source: Internet
Author: User
Oracle Stored Procedure mdash; PLS-00103: The symbol ldquo; rdquo; when the following is required :(

Oracle Stored Procedure mdash; PLS-00103: The symbol ldquo;/rdquo; when the following is required :(

Write a stored procedure in Oracle: the following error occurs,

PLS-00103: the sign '/' appears when you need the following :(

After a variety of Google Baidu, defining variables in the stored procedure does not allow the use of keywords, And I have defined the variable sum, resulting in errors.

The compiled code is as follows:

Create or replace procedure avg_sal (result out char)
Is
I number (5 );
Summ number (20 );
Countnum number (20 );
Begin
I: = 10;
While I <40 loop
I: = I + 10;
Select sum (salary), count (*) into summ countnum from emp where deptno = I;
Result: = summ/countnum;
End loop;
End;
/

,

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.