错误1054 mysql workbench forward engineering

wf82jlnq  于 2021-07-26  发布在  Java
关注(0)|答案(1)|浏览(260)

不明白怎么解决这个问题,以为是因为``不是。
错误: Error 1054: Unknown column 'departure_airport' in 'field list' ```
CREATE TABLE IF NOT EXISTS RedWingsDatabase.Route (
id INT NOT NULL,
departure_airport VARCHAR(205) NULL,
destination_airport VARCHAR(205) NULL,
flight_duration INT NULL,
PRIMARY KEY (id))
ENGINE = InnoDB;

USE RedWingsDatabase;
INSERT INTO RedWingsDatabase.Route (id, departure_airport, destination_airport, flight_duration) VALUES (1, 'Москва, Домодедово', 'Владивосток, Кневичи', 510);
INSERT INTO RedWingsDatabase.Route (id, departure_airport, destination_airport, flight_duration) VALUES (2, 'Воронеж, Пётр I', 'Омск, Центральный', 210);
INSERT INTO RedWingsDatabase.Route (id, departure_airport, destination_airport, flight_duration) VALUES (3, 'Самара, Курумоч', 'Москва, Домодедово', 105);
INSERT INTO RedWingsDatabase.Route (id, departure_airport, destination_airport, flight_duration) VALUES (4, 'Санкт-Петербург, Пулково', 'Москва, Домодедово', 90);

avkwfej4

avkwfej41#

对于多字节字符,请使用 NVARCHAR 尝试:

CREATE TABLE IF NOT EXISTS `Route` (
  `id` INT NOT NULL,
  `departure_airport` NVARCHAR(205) NULL,
  `destination_airport` NVARCHAR(205) NULL,
  `flight_duration` INT NULL,
  PRIMARY KEY (`id`));

编辑:演示

相关问题