帮我写一个sql,1-10求和
时间: 2024-06-06 22:08:31 浏览: 145
求1到100的和(sql)
SELECT SUM(numbers) FROM (SELECT 1 AS numbers UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION SELECT 10) AS t;
阅读全文