0
MySQL 데이터베이스에서 테이블을 변경했습니다. 이 오류가 발생합니다. 그 오류가 있다면 구문을 변경하는 방법을 모르겠습니다.SQL 오류 MySQL 워크 벤치
Operation failed: There was an error while applying the SQL script to the database.
Executing:
ALTER TABLE `invoicedb`.`c_order`
CHANGE COLUMN `name` `first_name` CHAR(20) NULL DEFAULT NULL ,
CHANGE COLUMN `phone_number` `last_name` CHAR(20) NULL DEFAULT NULL ,
CHANGE COLUMN `emailID` `email` CHAR(40) NULL DEFAULT NULL ,
CHANGE COLUMN `address` `phone_number` INT(10) NULL DEFAULT 0000000000 ,
CHANGE COLUMN `productID` `address_l1` CHAR(30) NULL DEFAULT NULL ,
CHANGE COLUMN `invoiceNo` `address_l2` CHAR(30) NULL DEFAULT NULL ,
CHANGE COLUMN `total` `product` INT(6) NULL DEFAULT Bicycle ,
ADD COLUMN `chassis_number` CHAR(15) NULL DEFAULT NULL AFTER `prouct`,
ADD COLUMN `invoice_number` CHAR(15) NULL DEFAULT NULL AFTER `chassis_number`,
ADD COLUMN `invoice_date` DATE NULL DEFAULT 'DD/MM/YYYY' AFTER `invoice_number`,
ADD COLUMN `valid_date` DATE NULL DEFAULT 'DD/MM/YYYY' AFTER `invoice_date`,
ADD COLUMN `invoice_value` FLOAT NULL DEFAULT 0000.00 AFTER `valid_date`;
ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Bicycle ,
ADD COLUMN `chassis_number` CHAR(15) NULL DEFAULT NULL AFTER `product`' at line 8
SQL Statement:
ALTER TABLE `invoicedb`.`c_order`
CHANGE COLUMN `name` `first_name` CHAR(20) NULL DEFAULT NULL ,
CHANGE COLUMN `phone_number` `last_name` CHAR(20) NULL DEFAULT NULL ,
CHANGE COLUMN `emailID` `email` CHAR(40) NULL DEFAULT NULL ,
CHANGE COLUMN `address` `phone_number` INT(10) NULL DEFAULT 0000000000 ,
CHANGE COLUMN `productID` `address_l1` CHAR(30) NULL DEFAULT NULL ,
CHANGE COLUMN `invoiceNo` `address_l2` CHAR(30) NULL DEFAULT NULL ,
CHANGE COLUMN `total` `product` INT(6) NULL DEFAULT Bicycle ,
ADD COLUMN `chassis_number` CHAR(15) NULL DEFAULT NULL AFTER `product`,
ADD COLUMN `invoice_number` CHAR(15) NULL DEFAULT NULL AFTER `chassis_number`,
ADD COLUMN `invoice_date` DATE NULL DEFAULT 'DD/MM/YYYY' AFTER `invoice_number`,
ADD COLUMN `valid_date` DATE NULL DEFAULT 'DD/MM/YYYY' AFTER `invoice_date`,
ADD COLUMN `invoice_value` FLOAT NULL DEFAULT 0000.00 AFTER `valid_date`
자전거가 텍스트이지만, 필드가 INT로 정의되었습니다 (6) – Cyrus
또한 이것은'AFTER \'prouct \','' –