我使用的是MySql 5.7.18版本,用下述语句创建视图(goods表是存在的,并且AS后的SELECT语句能够执行成功),在保存视图时,报错: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'…………' at line 3。我是新手,在论坛中也没有找到类似简单的报错提问。请问这是为什么 ?
CREATE VIEW XXXXX(
goods_name,
unit_price,
record_date
) AS SELECT
goods_name,
unit_price,
record_date
FROM
goods
WHERE
unit_price >= 1000
AND record_date = '2009-09-20';