大家早上好!在postgresql上用铸造数字作为小数创建视图时出错
我目前使用postgresql。那么,我需要创建视图的数字列保持圆角15.3,但我遇到了一个我无法理解的问题。
的选择工作:
select cast(15.2547 as decimal(15,3)) as quantidade_medida_estatistica
的看法不工作:
create or replace view teste as select cast(15.2547 as decimal(15,3)) as quantidade_medida_estatistica
错误:
ERROR: can not change the data type of column view "quantidade_medida_estatistica" of numeric (15,4) to numeric (15,3)
谢谢!