You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
程序员文章站
2022-07-14 10:28:56
...
报错信息
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 'AS t1
报错原因
习惯性用了小括号
源代码是这样的
CREATE VIEW view1 AS
SELECT t1.essn,t1.ename,t1.address,t1.dname
FROM (department NATURAL JOIN employee) AS t1
WHERE t1.dname='Produce Department';
修改方法
多select一层就好了
CREATE VIEW view1 AS
SELECT t1.essn, t1.ename, t1.address, t1.dname
FROM (
SELECT *
FROM department
NATURAL JOIN employee) AS t1
WHERE t1.dname = 'Produce Department';
上一篇: 关于FreeMarker自定义TemplateDirectiveModel
下一篇: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
推荐阅读
-
pymysql.err.ProgrammingError: (1064, “You have an error in your SQL syntax; check the manual that co
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
-
MySql-You have an error in your SQL syntax; check the manual that corresponds to your MySQL server v
-
(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
-
Mysql错误:[Err] 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
-
check the manual that corresponds to your MySQL server version for the right syntax的错误解析,correspondssyntax