标签: mysql
如何在MySQL COUNT的结果中添加固定的数字(例如2000)?
此刻我正在尝试
SELECT count(*) AS `count` FROM `Database` WHERE val = 2000 AS sum
答案 0 :(得分:1)
您可以在SELECT中添加固定值,如下所示:
SELECT
SELECT COUNT(*) + 2000 AS `count` FROM `TableName` WHERE <condition>