i cannot create a table , what is the wrong here ? ( Syntax error: Encountered "(" )

i cannot create a table , what is the wrong here ? ( Syntax error: Encountered "(" )

String sql = 

"CREATE TABLE coupon53 (
 id BIGINT PRIMARY KEY,
 title VARCHAR(25),
 start_date DATE,"+ " end_date DATE,
 amount INT,
 type ENUM ('Food', 'Electric', 'Travelling', 'Entertainment', 'Sport'))";

它似乎是您查询中的“+”。当我把它拿出来时工作正常。如果您从 CLI 查询,只需按回车键并继续输入并以 ; 结尾。当你准备好时。

编辑 - 抱歉,在我看到你使用 sql 之前回答 - 在 MySQL.

中工作正常
 String sql = "CREATE TABLE coupon40 (id BIGINT PRIMARY KEY, title VARCHAR(25), start_date DATE,"
+ " end_date DATE,"
+ "amount INTEGER,  type varchar(20) NOT NULL CHECK (type IN('Food', 'Electric', 'Traveling', 'Entertainment', 'Sport')), "
+ "message VARCHAR(25), price DOUBLE PRECISION, image VARCHAR(25))";