Are SQLite 3 type names and keywords in definitions case sensitive? Are SQLite 3 type names and keywords in definitions case sensitive? sqlite sqlite

Are SQLite 3 type names and keywords in definitions case sensitive?


I tested it with this code and it seems that the names are case-insensitive:

CREATE TABLE table_sensitive (       id INTEGER PRIMARY KEY,       some_int INTEGER,       some_text TEXT);create table table_insensitive (       id integer primary key,       some_int integer,       some_text text);INSERT INTO table_sensitive ( id, some_int, some_text )       VALUES ( 'not an integer key', 'a value', 123 );insert into table_insensitive ( id, some_int, some_text )       values ( 'not an integer key', 'a value', 123 );INSERT INTO table_sensitive ( id, some_int, some_text )       VALUES ( 0, '123', 123 );insert into table_insensitive ( id, some_int, some_text )       values ( 1, '123', 123 );SELECT typeof(id), typeof(some_int), typeof(some_text) FROM table_sensitive;select typeof(id), typeof(some_int), typeof(some_text) from table_insensitive;

The result was:

Error: near line 13: datatype mismatchError: near line 16: datatype mismatchinteger|integer|textinteger|integer|text

(Error on inserts with non-integer primary keys and type casting works for strings containing integers for both versions.)

This means that you can pretty much write keywords and types lowercase, which is what I wanted to know.