0
为十进制我有一个MySQL的功能,在那里我有铸造成十进制这样MySQL的投用可变精度
DECLARE len INT;
SET len = 10;
CAST((COUNT(*) * 1.5) AS DECIMAL(len))
然而,当我运行它,我得到错误
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 'len)
我要的是在AS DECIMAL()
表达式中使用变量len。