这里不允许列错误

时间:2013-09-22 05:10:58

标签: sql oracle10g runtime-error

我尝试通过以下指令插入Oracle表:

insert into orders values (&order_id, &order_date, '&customer_id', &amount);

其中desc orders如下:

Name        Null Type      
----------- ---- --------- 
ORDER_ID         NUMBER(4) 
ORDER_DATE       DATE      
CUSTOMER_ID      NUMBER(4) 
AMOUNT           NUMBER(5) 

我尝试插入:order_id = 110,order_date = 12-march-2013,customer_id = 115和amount = 1100

这是我收到的错误消息:

Error starting at line 26 in command:
insert into orders values (110, 12-march-2013, 115, 1100)
Error at Command Line:26 Column:35
Error report:
SQL Error: ORA-00984: column not allowed here
00984. 00000 -  "column not allowed here"
*Cause:    
*Action:

1 个答案:

答案 0 :(得分:1)

此代码有效

insert into orders values (200, '12-march-2013', 100, 1100)