ORA-00947: Not enough values does Not have enough value

Source: Internet
Author: User

This error occurs when the insert statement is executed.
 
Insert into Table 1 values (123,2423, 12 );
 
The structure of Table 1 has four columns. Obviously, only three columns are inserted, so this problem occurs.
 
After the value of another column is executed, OK.
 
If you only want to insert three values:
 
Insert into table 1 (a, B, c) values (123,2423, 12 );
 
Use this statement.
 
Create or replace procedure myproc (cname1 in varchar2, semester1 in varchar2, avgScore out number)
As
Begin
Select classno class, avg (score) average score into avgScore
From student s, course c, student_course_teacher sct
Where s. classno = classno1
And c. cname = cname1
And sct. semester = semester1
And s. sno = sct. sno
And c. cno = sct. cno
Group by classno;
End;
 
Here, the select classno class, avg (score) average score into avgScore has a problem, changed to create or replace procedure myproc (classno1 in varchar2, cname1 in varchar2, semester1 in varchar2, avgScore out number)
 
The select avg (score) Average into avgScore problem can be solved. Note that the number of updated values is consistent with the number of attribute values.

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.