ORA-00913: 值过多
来源:互联网 发布:淘宝助理下载不了订单 编辑:程序博客网 时间:2024/05/02 21:08
ORA-00913: too many values
。。。。(后面的具体的就不写了)
第一次碰到这样的情况,上网一查才知道:原来同事的sql语句写错了:具体就不说了,主要是一个INSERT语句:结果
VALUES后面的插入的数据比前面的字段名多了一个,所以才出现了所谓的“too many values”错误。
---------------------------------------
我参考的1个帖子如下:感觉写得不错(虽然是e文写的):
http://www.techonthenet.com/oracle/errors/ora00913.php
Oracle/PLSQL: ORA-00913 Error
Error:
ORA-00913: too many valuesCause:
You tried to execute an SQL statement that required two sets of equal values, but you entered more items in the second set than was in the first set.Action:
The options to resolve this Oracle error are:- This error often occurs when you are performing anINSERT statement and enter more values in the VALUES clause than the number of columns that you listed.
For example, if you executed the following INSERT statement:
INSERT INTO suppliers
(supplier_id, supplier_name)
VALUES
(1000, 'Microsoft', 'Bill Gates');In this example, you've chosen to insert values into 2 columns (supplier_id and supplier_name), but you've entered 3 values (1000, Microsoft, and Bill Gates).
You need to modify your INSERT statement so there are the same number of columns as there are values. For example:
INSERT INTO suppliers
(supplier_id, supplier_name)
VALUES
(1000, 'Microsoft');
- This error can also occur when your subquery in the WHERE clause returns too many columns.
For example, if you executed the following SQL statement:
SELECT * FROM suppliersWHERE supplier_id > 5000AND supplier_id IN(SELECT * FROM products WHERE product_name LIKE 'H%);In this example, the subquery returns all columns from the products table. You need to modify the subquery to return only one column as follows:
SELECT * FROM suppliersWHERE supplier_id > 5000AND supplier_id IN(SELECT product_id FROM productsWHERE product_name LIKE 'H%);
- ORA-00913: 值过多
- ORA-00913: 值过多
- ORA-00913: 值过多
- SQLexception , ORA-00913: 值过多
- ORA-00913: 值过多 ORA-06550: 第 2 行, 第 4 列: PL/SQL: SQL Statement ignored
- TRUNC函数,ORA-01898 精度说明符过多
- Oracle ORA-02020 : 过多的数据库链接
- ORA-02020错误:过多的数据库连接使用中问题
- Oracle DBLink连接数过多的问题(Ora-02020)
- pl/sql提示值过多
- hibernate3.2打开游标过多:出现ORA-01000: maximum open cursors exceeded错误
- Oracle ORA-02020 : 过多的数据库链接在使用中解决步骤
- JOB执行过程中,提示值过多错误
- time_wait过多
- TIME_WATI过多
- echartsX过多
- ORA
- ora
- 设计模式之Builder模式
- Linux 信号signal处理机制(转载有改动)
- nosql
- 电子商务示范网站
- tail命令行参数
- ORA-00913: 值过多
- 右键获取listview控件各个单元格的值,想更改就简单了吧
- uva321 - The New Villa(新别墅)
- Mtk 下的图形渲染配置文件egl.cfg
- PDP分组数据协议
- 判断数组中是否有重复的数——微软面试题
- Poj 1006 Biorhythms
- Silverlight调用的JS方法返回对象数组的处理方法
- Tomcat使用startup可以启动,windows服务无法启动