mysql - mysql“where子句中的未知列”
问题描述
我试图编写一个程序,但是当我尝试运行它时,我得到了这个错误:
错误代码:1054。“where 子句”中的未知列“lista1.ID”
这是例程代码:
CREATE DEFINER=`root`@`%.zamberlan.local` PROCEDURE `TMTotal`()
BEGIN
DROP temporary table if exists `lista1`;
CREATE temporary TABLE `lista1` as
(select
T.idarticolo as ID,
avg(tempo) as TI
from
(select
idarticolo,
ordineua,
tempo
From ordini
where tempo Is Not Null
group by ordineua
having count(ordineua) = 1) T
group by T.idarticolo);
UPDATE
articoli
set
tempomediogg=lista1.TI
where articoli.id=lista1.ID;
END
为什么?
解决方案
推荐阅读
- javascript - Fabric js适合给定尺寸的图像而不拉伸
- c# - 通过实体框架中的字符串列名获取数据(不重复,它们是完全不同的问题)
- kotlin - 如何在不使用 Kotlin 中的集合映射的情况下复制或克隆数据对象的 mutableList
- r - 计算 R 中循环的最小和最大使用
- javascript - Javascript。使用 React 的可拖动 div
- reactjs - TypeError: botframework_directlinejs__WEBPACK_IMPORTED_MODULE_5___default.a 不是构造函数
- c++ - Vcpkg libs 执行时速度低
- reactjs - 反应原生:navigationOptions 中的标题样式不起作用
- java - 如何在 ElasticSearch 6.5 中按父级查询?
- sql - 类型ORM子查询