我的MySQL插入查询有什么问题?

时间:2014-12-01 00:35:56

标签: mysql database insert workbench

我得到了:

Error Code: 1054. Unknown column 'Minit' in 'field list'

我的数据库构建脚本:

CREATE DATABASE IF NOT EXISTS CompanyDB;

USE CompanyDB;

#Create Employee w/ Ssn as primary key
CREATE TABLE IF NOT EXISTS EMPLOYEE ( Fname VARCHAR(20), Minit CHAR, LName VARCHAR(20), Ssn VARCHAR(20), 
Bdate VARCHAR(20), Address VARCHAR(20), Sex CHAR, Salary INT, Super_Ssn VARCHAR(20), DNO INT, 
PRIMARY KEY (Ssn)
);

我的脚本插入数据库:

USE CompanyDB;

#a
INSERT INTO EMPLOYEE
( Fname , Minit, LName, Ssn , Bdate , Address , Sex , Salary , Super_Ssn , DNO)
VALUES 
("Robert","F","Scott","943775543","1972-06-21","2365 Newcastle Rd, Bellaire, TX", "M", 
58000,"888665555",1);

我正在使用MySQL工作台来执行查询。我试过在char' F'周围使用单引号。和' M'同样也是如此。

0 个答案:

没有答案