Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallIn an ordinary SQLite table, a column’s declared type usually does not lock it to one storage type. The declaration selects a type affinity, which can influence how SQLite stores inserted values and compares them in queries. The value itself has a storage class: NULL, INTEGER, REAL, TEXT, or BLOB. If you need stronger storage-type enforcement, use a STRICT table; for rules about what a value means, add explicit validation.
Declared type, affinity, and storage class are different
SQLite uses a dynamic type system: the type is associated with each value, rather than rigidly fixed by an ordinary table column. A column’s affinity acts as a preference that guides conversions during insertion and, in some cases, comparisons. As the SQLite Datatypes documentation puts it, “Flexible typing is a feature of SQLite, not a bug.”
The five storage classes are NULL, INTEGER, REAL, TEXT, and BLOB. Boolean values use INTEGER storage—0 and 1—not a separate Boolean storage class. SQLite also has no dedicated date/time storage class: date and time values can be represented as TEXT, REAL, or INTEGER, depending on the representation used.
That distinction explains the common surprise, “SQLite lets me insert a string into a database column of type integer!” In a non-STRICT table, a declaration such as INTEGER selects an affinity; it does not generally prohibit every value that is not stored as an integer.
Recommended Free Tools
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
How SQLite assigns affinity to ordinary columns
For tables that are not STRICT, SQLite determines affinity by checking the declared type name against these rules in order. The first matching rule wins:
- INTEGER: The declared type contains
INT. - TEXT: It contains
CHAR,CLOB, orTEXT. - BLOB: It contains
BLOB, or the type is omitted. - REAL: It contains
REAL,FLOA, orDOUB. - NUMERIC: None of the preceding rules match.
The order and substring matches can produce unexpected results. For example, CHARINT has INTEGER affinity because it matches the first rule. FLOATING POINT also has INTEGER affinity because POINT contains INT. STRING has NUMERIC affinity. By contrast, VARCHAR(255) has TEXT affinity because it contains CHAR; the (255) does not impose a 255-character limit. These rules apply to non-STRICT tables. See the official affinity rules.
What affinity can do to a value on insertion
Affinity does not mean “convert everything.” It guides SQLite’s attempt to convert values where the documented rules allow it. The value that is ultimately stored can therefore have a different storage class from the input representation.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
- TEXT affinity converts numeric inputs to text form.
- NUMERIC affinity attempts to convert well-formed integer or real text to INTEGER or REAL, preferring INTEGER when the value can be represented that way. Text that is not a well-formed numeric literal remains text; NULL and BLOB values are not coerced by NUMERIC affinity.
- INTEGER affinity behaves like NUMERIC affinity for insertion. Their documented difference appears in CAST behavior.
- REAL affinity behaves like NUMERIC affinity but represents integer inputs as floating point at the SQL level.
- BLOB affinity makes no storage-class preference.
For example, SQLite documents that text 3.0e+5 inserted into a NUMERIC-affinity column is stored as integer 300000, because the value can be represented exactly as an integer. Hexadecimal integer notation is not treated as a well-formed numeric literal for this insertion conversion. When SQLite converts TEXT to REAL, the documented conversion preserves about 15.95 significant decimal digits, reflecting binary64 floating-point representation. These conversion details are described in the SQLite Datatypes documentation.
Inspect the stored class with typeof()
Use typeof() to check the storage class SQLite reports, rather than inferring it from how a value was written. This example inserts the same numeric value into columns with different affinities:
CREATE TABLE affinity_demo (
text_value TEXT,
numeric_value NUMERIC,
integer_value INTEGER,
real_value REAL,
blob_value BLOB
);
INSERT INTO affinity_demo VALUES (500.0, 500.0, 500.0, 500.0, 500.0);
SELECT typeof(text_value),
typeof(numeric_value),
typeof(integer_value),
typeof(real_value),
typeof(blob_value)
FROM affinity_demo;
SQLite’s documented example reports, in column order, text, integer, integer, real, and real. The TEXT column converts the numeric input to text; NUMERIC and INTEGER store this value as an integer; REAL represents it as real. BLOB affinity itself makes no preference, so it does not force this numeric input to become a BLOB. The official examples also show that NULL and BLOB values are unaffected by affinity in this context.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Why comparisons can behave differently from insertion
Affinity can also affect comparisons. Before comparing operands, SQLite may apply a conversion based on their affinities. In broad terms, numeric affinity on one side can cause a TEXT, BLOB, or untyped value on the other side to be converted to numeric when conversion is permitted; TEXT affinity can cause an untyped opposing value to become text. If neither rule applies, SQLite compares using the values’ storage classes.
When values are compared by storage class, the order is NULL, then INTEGER and REAL in numeric order, then TEXT according to collation, and finally BLOB in byte order. Consequently, values that look alike in application code may compare differently depending on whether they are stored as numbers or text, and on the affinity of the operands. The SQLite comparison rules include examples where the same visible-looking value compares differently with TEXT, NUMERIC, or no affinity.
Columns and expressions do not always have the same affinity
A direct reference to a table column retains that column’s affinity. Most expressions have no affinity, while a CAST expression takes the affinity of the type named in the cast. For an IN (value, ...) list, the right-hand list elements are treated as having no affinity. This means rewriting a column comparison as an expression can change whether affinity-driven conversion applies.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Sorting and grouping do not convert values the same way
ORDER BY sorting does not apply storage-class conversions. GROUP BY also applies no affinity: values from different storage classes remain distinct, except that INTEGER and REAL values that are numerically equal are treated as equal. Mixed-type columns can therefore produce ordering or grouping that differs from expectations based only on how values look.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.When to use a STRICT table
STRICT tables, introduced in SQLite 3.37.0, released on 2021-11-27, provide stronger storage-type enforcement. Add STRICT after the closing parenthesis of a table definition. Every column must declare a type, and the permitted type names are INT, INTEGER, REAL, TEXT, BLOB, and ANY.
For types other than ANY, an inserted value must be NULL where permitted or have the specified type after SQLite’s usual affinity coercion. If SQLite cannot convert the value losslessly, the insert fails with SQLITE_CONSTRAINT_DATATYPE. The SQLite STRICT Tables documentation says: “SQLite attempts to coerce the data into the appropriate type using the usual affinity rules, as PostgreSQL, MySQL, SQL Server, and Oracle all do.” That is the documentation’s description of coercion, not a broader comparison of database behavior.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
CREATE TABLE inventory (
item_id INTEGER PRIMARY KEY,
quantity INTEGER NOT NULL,
label TEXT
) STRICT;
Here, SQLite enforces the declared storage types subject to the table’s constraints. For example, NOT NULL is an additional constraint on quantity; STRICT mode does not replace ordinary schema constraints.
STRICT ANY preserves numeric-looking text
ANY behaves differently in STRICT and non-STRICT tables. In a STRICT table, an ANY column preserves a value as supplied, including numeric-looking text. In a non-STRICT ordinary table, an ANY column can convert numeric-looking text to a numeric value under the ordinary affinity rules. Do not treat ordinary BLOB affinity as the same thing as STRICT ANY: BLOB affinity makes no preference, while STRICT ANY has the documented preservation behavior. Details are in the STRICT Tables documentation.
Choose the table style for the rule you need
| Question | Ordinary, non-STRICT table | STRICT table |
|---|---|---|
| Can a column contain mixed storage classes? | Yes; affinity guides conversions but does not generally reject other storage classes. | For types other than ANY, values must match the declared type after permitted lossless coercion, or be NULL where allowed. |
| Is lossless coercion sufficient? | Affinity may convert values, but a value that remains a different storage class is not generally rejected just for that reason. | Yes, for the declared storage type: SQLite applies its usual affinity rules and rejects values it cannot convert losslessly. |
| Do you need an arbitrary declared type name? | Yes, ordinary tables allow type names that select affinity through the ordered substring rules. | No; declarations are restricted to INT, INTEGER, REAL, TEXT, BLOB, and ANY. |
| Must numeric-looking text remain text in an ANY column? | Not necessarily; ordinary ANY can convert it under ordinary affinity behavior. | Yes; STRICT ANY preserves the value as supplied. |
| Do you need a domain-specific rule? | Use a CHECK constraint, another schema constraint, or application validation as appropriate. | Use the same additional validation; STRICT enforces storage types, not every rule about what values mean. |
STRICT does not validate the meaning of your data
A storage type is not a semantic rule. A STRICT TEXT column does not, by itself, guarantee that a string is a valid date, belongs to an allowed set, or follows a domain-specific format. Likewise, a STRICT INTEGER column does not establish an application-specific range. Add suitable CHECK constraints or other schema constraints, and use application validation when the rule requires it.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →

