Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
mysql错误代码1054不确定它的意思_Mysql - Fatal编程技术网

mysql错误代码1054不确定它的意思

mysql错误代码1054不确定它的意思,mysql,Mysql,我在“字段列表”中得到错误代码1054未知列“interlake” drop table if exists `Boats`; create table `Boats` ( `bid` int(11) not null, `bname` varchar(45) default null, `color` varchar(15) default null, primary key (`bid`) ) engine=InnoDB default charset=latin1; alter tab

我在“字段列表”中得到错误代码1054未知列“interlake”

drop table if exists `Boats`;
create table `Boats` (
`bid` int(11) not null,
`bname` varchar(45) default null,
`color` varchar(15) default null,
 primary key (`bid`)
) engine=InnoDB default charset=latin1;

alter table `Boats` disable keys;
insert into `Boats` values
(101,`Interlake`,`blue`),(102,`Interlake`,`red`),(103,`Clipper`,`green`),(104,`Marine`,`red`);
alter table `Boats` enable keys;

使用引号而不是反勾号

INSERT INTO `Boats`
(`bid`, `bname`, `color`) 
VALUES  
(101,"Interlake","blue"),
(102,"Interlake","red"),
(103,"Clipper","green"),
(104,"Marine","red");

你有没有试着用撇号去掉背上的记号

insert into `Boats` values
(101, 'Interlake', 'blue'),(102, 'Interlake', 'red'),(103, 'Clipper', 'green'),(104, 'Marine', 'red');
您缺少“值”,并且使用引号(“”或“”)而不是反勾(``)

试试这个

drop table if exists `Boats`;
create table `Boats` (
`bid` int(11) not null,
`bname` varchar(45) default null,
`color` varchar(15) default null,
 primary key (`bid`)
) engine=InnoDB default charset=latin1;

ALTER TABLE `Boats` disable KEYS ;

INSERT INTO Boats
    ( bid, bname, color)
VALUES
    ( 101, 'Interlake', 'blue'),
    ( 102, 'Interlake', 'blue'),
    ( 103, 'Interlake', 'blue');


ALTER TABLE `Boats` enable KEYS ;

可能重复的“我没有引号”或“我的intsback”上的反勾号通常用于表示列名