sqlite3 CLI `.mode` integer and floating-point format options
Introduced 2026-10-09 · score 0.95
HOW TO USE IT
When inspecting query output, set `.mode`’s `--ifmt` and/or `--fpfmt` options to control integer and floating-point rendering.
.mode qbox --ifmt ",d" --fpfmt "%.2f"
SELECT * FROM <table>;.mode qbox --ifmt %x --fpfmt %.8e
SELECT * FROM <table>;WHY THIS HELPS
Control how integer and floating-point values render when inspecting query output.
REQUIREMENTS AND LIMITATIONS
- Version: 3.54.0
- --ifmt STRING: printf-style format for integer values. If set, STRING begins with `%` and ends in `d`, `x`, `X`, or `o`; optional width and precision are each at most 3 digits, precision is ignored, and accepted flags are `+`, `-`, `#`, `0`, and `,`. `auto` uses default integer conversion.
- --fpfmt STRING: printf-style format for floating-point values. If set, STRING begins with `%` and ends in `f`, `e`, `E`, `g`, or `G`; optional width and precision are each at most 3 digits, and accepted flags are `+`, `-`, `#`, and `,`. `auto` uses default floating-point conversion.
- Prerequisite: Use SQLite CLI version 3.54.0 or later for the card’s stated version; the documentation examples identify the CLI as SQLite 3.54.
FIRST-PARTY EVIDENCE
- https://sqlite.org/changes.html#version_3_54_0
- https://sqlite.org/climode.html
- https://sqlite.org/climode.html#opt-ifmt
- https://sqlite.org/climode.html#opt-fpfmt
Check the installed version and the source before using it. Entry JSON