mysql - 更新查询中的语法错误

标签 mysql

<分区>

我得到了

ERROR 1064 (42000): 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 1' error for the following query

update Stops set trip_flag = true,
  route_type = (select route_type from Routes 
                where route_id = (select route_id from Trips 
                                  where trip_id = (select trip_id from  Stop_Times
                                                   where stop_id = (select stop_id from Stops where location_type = 0)));

请帮帮我。

最佳答案

末尾缺少右括号 )。

关于mysql - 更新查询中的语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10394220/

相关文章:

mysql - 当我们使用嵌套查询 for max(cgpa) 时,我们可以使用 select * 吗

mysql - SQL返回单行内连接

php - MySQL LIMIT 结果与 INNER JOIN 超过 2 个表

php - 在 mySQL 中计算每天和每小时的结果

php - 使用 PHP 表单下拉列表创建 mySQL 查询 - 如果用户忽略下拉列表,则不要按该参数进行过滤

php - MySQL - 结合 INSERT、VALUES 和 SELECT?

java - 将嵌套 sql 查询转换为 jpa/hibernate

php - 带 id 的多维关联数组

java - 如何选择特定日期的最大时间戳?

php - 计算从 PHP `mysql_query` 函数返回的行数的可靠方法是什么?