Mysql 如何修复字段中的错误#1054未知列

Mysql 如何修复字段中的错误#1054未知列,mysql,mysql-error-1054,Mysql,Mysql Error 1054,这是我的桌子 create table Property( p_id int(4) null primary key, p_address varchar(120) not null, c_id int(4) not null, foreign key (c_id) references customer (c_id) ); insert into Property values ('2001','Elm_House_11_Short_Lane_Hertfordshire_H5_667',’

这是我的桌子

create table Property(
p_id int(4) null primary key,
p_address varchar(120) not null,
c_id int(4) not null,
foreign key (c_id) references customer (c_id)
);


insert into Property values
('2001','Elm_House_11_Short_Lane_Hertfordshire_H5_667',’3001’);

insert into Property values 
('2002','Jainlight_House_Apple_Lane_Kent_K7_988',’3002’);

insert into Property values
('2003','Excelsior_House_23_Oracle_Centre_Reading',’3003’);

insert into Property values ('2004','27_Wroxton_Road_London_SE15',’3004’);

输入此数据时,我一直遇到未知列错误。

插入
int
值时,请删除引号和反勾号:

insert into Property values
(2001,'Elm_House_11_Short_Lane_Hertfordshire_H5_667',3001);

insert into Property values 
(2002,'Jainlight_House_Apple_Lane_Kent_K7_988',3002);

insert into Property values
(2003,'Excelsior_House_23_Oracle_Centre_Reading',3003);

insert into Property values (2004,'27_Wroxton_Road_London_SE15',3004);

只有在处理
char
字段时才需要引号,反勾号是表名或列名的转义字符。

我从MariaDb导出,然后导入MySql时遇到此错误。它涉及我最近添加的一个字段,但我还没有为其添加值——因此在所有记录中,该字段都是空的。当我为这个字段添加了一些值时,错误消失了。

您在
c\u id
数据周围使用了不正确的引号:您在实际使用撇号时使用了正确的引号。请注意,您实际上不需要引用整数。谢谢各位,我的文件是用Microsoft word打开的,它更改了我的字符配置……我会留意这些。欢迎使用stackoverflow。在回答部分,你不能再问别的问题,即使它是相关的。请提供正确答案或使用提问按钮询问其他问题。如果你有足够的声誉,你也可以加上一条评论。@GileadKenzo:如果你没问问题的话。我提供了一个可能与其他遇到相同错误的人相关的备选答案。Hi@user2587656。如果您认为这可能会引起兴趣,您可以提出一个问题并回答它,或者,您可以扩展您的经验并编辑文档。您的答案没有回复原始答案,可能会衍生出另一条评论线索。