Use the printf function:
> SELECT printf("%.3f", 1);
1.000
Question
In SQLite, you can use CAST([column] as text) to convert a result in a string, however, for double this will result in having 1 decimal. How can I control whether I want to display decimals or the number of decimals displayed.
La solution
Use the printf function:
> SELECT printf("%.3f", 1);
1.000