SQL错误:ORA-12899:列的值太大 [英] SQL Error: ORA-12899: value too large for column
问题描述
我已经创建了下表
CREATE TABLE Customers(
CustomerID varchar2(9) PRIMARY KEY,
Customer_Contact varchar2(40) NOT NULL,
Address varchar2(20) NOT NULL,
Post_Code varchar2(7) NOT NULL,
Telephone_Number varchar2(11) NOT NULL)
并且我当前正在尝试使用INSERT VALUES语句.我写了以下声明
And I am currently trying to use the INSERT VALUES statement. I have written the following statement
INSERT INTO Customers VALUES(
501623129,
'John Petterson',
'-- Singleton Close London',
'--- ---', 02082860222)
当我尝试运行该语句时,它会显示以下错误消息.
When I try to run the statement it gives me the following error message.
从命令的第4行开始出现错误: 插入客户 值(501623129,"David Patterson", '30 Singleton Close London','SW17 9JY',02082860642)错误报告:SQL 错误:ORA-12899:值太大 栏"DJ".客户".地址" (实际数量:25,最大数量:20) 12899. 00000-值对于列%s太大(实际:%s,最大值:%s)"
Error starting at line 4 in command: INSERT INTO Customers VALUES(501623129, 'David Patterson', '30 Singleton Close London', 'SW17 9JY', 02082860642) Error report: SQL Error: ORA-12899: value too large for column "DJ"."CUSTOMERS"."ADDRESS" (actual: 25, maximum: 20) 12899. 00000 - "value too large for column %s (actual: %s, maximum: %s)"
推荐答案
ORA-12899: value too large for column "DJ"."CUSTOMERS"."ADDRESS" (actual: 25, maximum: 2
告诉您错误是什么.地址最多可包含20个字符,您正在传递25个字符.
Tells you what the error is. Address can hold maximum of 20 characters, you are passing 25 characters.
这篇关于SQL错误:ORA-12899:列的值太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!