gpt4 book ai didi

mysql - 字段列表中的未知列 - 部门

转载 作者:行者123 更新时间:2023-11-29 08:35:25 26 4
gpt4 key购买 nike

此查询将返回错误(字段列表中未知列 numero_propostas)。我想要的是这样的:

SELECT COUNT(*) as numero_propostas, 
total as total,
(numero_propostas / total) as divisao
FROM ConsultaArtigos2 AS ca
...

正确的做法是什么?

最佳答案

在 MySQL 查询语句中,您必须在引用位置使用列名

  SELECT COUNT(*) as numero_propostas, 
total as total,
(COUNT(*) / total) as divisao
FROM ConsultaArtigos2 AS ca

关于mysql - 字段列表中的未知列 - 部门,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15382813/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com