Integer
functionalChoose the grouping, sign, and units that make whole numbers quick to read.
For whole-number columns, Settings › Results › Integer holds the choices that make counts, quantities, and large values easier to scan.
| Option | Choices | Default |
|---|---|---|
| Thousands separators | On / off (grouped with commas) | On |
| Reduce large numbers | Abbreviate to K / M / G / T / P | Off |
| Metric threshold | Smallest value that is abbreviated | 1000 |
| Negative format | Minus sign (-42) / Parentheses ((42)) | Minus sign |
| Alignment | Left / Center / Right | Right |


What the grid shows
A few values under different settings, exactly as an integer cell draws them:
| Value | Settings | Grid shows |
|---|---|---|
1234567 | Defaults | 1,234,567 |
1234567 | Thousands separators off | 1234567 |
-1234 | Defaults | -1,234 |
-1234 | Negative format: Parentheses | (1,234) |
9223372036854775807 | Defaults | 9,223,372,036,854,775,807 |
Integers group with a comma, the thousands and decimal characters under
Decimal apply to decimal
columns only, and the integer sample in Settings groups the same way. Integers up to
the 64-bit limit are drawn digit for digit - SQLly does not round large
bigint values through a floating-point number on the way to the screen.
Reduce large numbers
With Reduce large numbers on, integer cells at or above the Metric threshold are abbreviated with K, M, G, T, or P and two decimals. The same rule shapes the sample in Settings and the counts SQLly reports about your results - the Result 1: … row(s) label and the Completed in … ms line in Messages.
| Value | Threshold 1000, off | Threshold 1000, on | Threshold 10000, on |
|---|---|---|---|
999 | 999 | 999 | 999 |
1500 | 1,500 | 1.50K | 1,500 |
12128 | 12,128 | 12.13K | 12.13K |
1234567 | 1,234,567 | 1.23M | 1.23M |
-2500000000 | -2,500,000,000 | -2.50G | -2.50G |
- The threshold only decides what is abbreviated. The letters always mean thousand, million, billion, trillion, and quadrillion, so a threshold of 10000 leaves
5,000in full and shows15000as15.00K. A threshold below 1000 abbreviates nothing extra, there is no letter for a value under a thousand. - Display only. The cell still holds the exact number: sorting, numeric filters, copy, and export all use it. A text filter matches what you see, so
1.50kfinds the abbreviated cell. - Negatives keep your negative format -
-1.50K, or(1.50K)with parentheses.
One column at a time
Right-click an integer column's header and choose Format › Set Formatting Override… for a per-column choice that is saved into the query:
- Thousands separators or Plain integer - turn grouping on or off for just this column.
- Epoch seconds → date/time and Epoch milliseconds → date/time - show a Unix timestamp as a readable date. See Dates.
Plain integer is the one to reach for on identifiers and years. Grouping is great for
quantities but turns an order number into 1,048,576 and a MySQL
YEAR column into 2,026. The menu offers the integer list for
int, bigint, smallint, tinyint, and
serial columns; for other integer types such as YEAR, type
the same directive yourself:
-- sqlly format: column=OrderID; number=0; thousands=false
-- sqlly format: column=FiscalYear; number=0; thousands=false
SELECT OrderID, FiscalYear, SUM(Quantity) AS Units
FROM sales
GROUP BY OrderID, FiscalYear;
A number= directive sets the column's places and grouping and keeps the rest of its integer settings - Negative format and Alignment still apply. Fixed places also means the column is never abbreviated, even with Reduce large numbers on.
Elsewhere in SQLly
- Selection summary. Select integer cells and the Count, Sum, Min, Max, and Distinct figures under the grid use your thousands and negative settings (but are never abbreviated).
- Copy and export. These always carry the raw number -
1,234,567on screen copies as1234567, and spreadsheets receive a real number. See Export. - NULL is never formatted; it shows as an italic
NULL.