Oracle PL/SQL ORA-00947 Not Enough Values Error甲骨文PL / SQL的库存- 00947没有足够的价值观错误
In Oracle database, the following error message may appear when an incorrect SQL statement is used, in SQL Plus or in anywhere that send SQL queries to the databases such as stored procedure or external programs.在Oracle数据库中,可能出现下列错误讯息时,一不正确SQL语句是使用,在SQL Plus或在任何地方发送SQL查询到的数据库,如存储过程或外部程序。
PL/SQL: SQL Statement ignored PL / SQL的: SQL语句忽视
PL/SQL: ORA-00947: not enough values PL / SQL的货存状况: - 00947 :没有足够的价值观
The reason for ORA-00947 error is when a SQL statement requires two sets of value, ie number of number of columns and its value that are specified in the SQL to be equal in number.原因是库存- 00947错误是,当一个SQL语句需要两套价值,即数目的列数和它的价值是指定在SQL Server必须在平等的数目。 But the second part of the query which is column values contains fewer items than the first part which is the number of columns.但第二部分的查询,这是列的值包含较少的项目比第一部分是列数。 The error may happens in all kind of SQL statements - Insert, Update or Select - and it can also occur in a WHERE or HAVING clause in which a nested sub-SELECT returns too few columns.该错误可能发生在所有种的SQL语句-插入,更新或选择-和它也可以发生在一个地方,或有在第一个嵌套小组专责的回报太少栏。 If the SQL does not specify columns, it means that the values entered are less that the columns existed in the table in database.如果SQL没有具体栏目,这意味着,价值观进入较少,该栏目中存在的表在数据库中。
For example, the ORA-00947 error will be returned if you try to execute the following SQL statements:举例来说,库存- 00947错误将被退回如果您尝试执行下列SQL语句:
INSERT INTO Customers (Customer_ID, Customer_Name, Birthday) VALUES (’1′, ‘My Customer’);插入到客户( customer_id , customer_name ,生日)值( 1 ' , '我的顾客' ) ;
or或
SELECT * FROM Customers WHERE (Customer_ID, Customer_Name) IN (SELECT Customer_ID FROM Orders);选择*从客户在哪里( customer_id , customer_name )在(选择customer_id从订单) ;
To solve the error and correct the problem, check that the number of values provided in the column values part is equal that the columns specified, or the number of columns in table, and change the SQL statement to make them equal.要解决错误和正确的问题,检查人数的价值观所提供的在该列的值的一部分,是平等的,该栏目指定,或列数在表,并更改SQL语句,使他们平等的。
You can either reduce the number of columns, or increase the number of values provided to the column to make the SQL statement equaled.您可以减少列数,或增加的数目价值观提供给栏,使SQL语句持平。 This applies to the nested SQL statements with HAVING or WHERE clause too.这适用于嵌套SQL语句与拥有或WHERE子句。 For example, the correct SQL statements should be like the following:举例来说,正确的SQL语句应该像以下内容:
INSERT INTO Customers (Customer_ID, Customer_Name, Birthday) VALUES (’1′, ‘My Customer’, ‘08/08/1988′);插入到客户( customer_id , customer_name ,生日)值( 1 ' , '我的顾客' , '08 / 1988分之08 ' ) ;
or或
INSERT INTO Customers (Customer_ID, Customer_Name) VALUES (’1′, ‘My Customer’);插入到客户( customer_id , customer_name )值( 1 ' , '我的顾客' ) ;
or或
SELECT * FROM Customers WHERE (Customer_ID, Customer_Name) IN (SELECT Customer_ID, Customer_Name FROM Orders);选择*从客户在哪里( customer_id , customer_name )在(选择customer_id , customer_name从订单) ;
or或
SELECT * FROM Customers WHERE (Customer_ID) IN (SELECT Customer_ID FROM Orders);选择*从客户在哪里( customer_id )在(选择customer_id从订单) ;
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要说明 :这是一个机器翻译网页是“按原样”提供的担保。 Machine translation may be difficult to understand.机器翻译可能很难理解。 Please refer to请参阅 original English article英文原版的文章 whenever possible.只要有可能。
Share and contribute or get technical support and help at分享和贡献,或取得技术的支持和帮助,在 My Digital Life Forums 我的数字生活论坛 . 。
Related Articles相关文章
- Oracle Database Import Error 3113/3114 Oracle数据库的进口错误三千一百一十四分之三千一百十三
- Create, Add or Split Oracle Database Partition Fails with ORA-14080 Error创建,添加或分裂Oracle数据库分区失败,库存- 14080错误
- ORA-00942 Table or View Does Not Exist Oracle Error库存- 00942表或视图不存在Oracle错误
- ORA-02449 Oracle Drop Table Error库存- 02449甲骨文下拉表错误
- Oracle ORA-01658 Unable to Create INITIAL Extent for Segment in Tablespace Error甲骨文库存- 01658无法建立初步的程度,为部分在表错误
- ORA-01502 Oracle Index in Unusable State库存- 01502甲骨文指数在使用的国家
- Manual and Clean Uninstall Oracle for Windows手册和干净的卸载甲骨文为Windows
- Oracle ORA-14074 Create or Add New Partition Fails Error甲骨文库存- 14074创建或添加新的分区失败的错误
- How to Rename or Move Oracle Tablespace Datafile to Another Location如何重新命名或移动甲骨文表datafile到另一个位置
- How to Escape Characters in Oracle PL/SQL Queries如何转义字符在Oracle PL / SQL的疑问















