在 SQLite 中,如果我们查询一个浮点数,在显示结果中,末尾的 0 会被省略:

如果我们想固定输出两位小数,在 SQLite 中可以借助其内置的 printf 方法:

关于 SQLite 中 printf 方法更详细的介绍可以参见: https://www.sqlite.org/printf.html
在 SQLite 中,如果我们查询一个浮点数,在显示结果中,末尾的 0 会被省略:
如果我们想固定输出两位小数,在 SQLite 中可以借助其内置的 printf 方法:
关于 SQLite 中 printf 方法更详细的介绍可以参见: https://www.sqlite.org/printf.html