til

Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager

View project on GitHub

VARCHAR is just text

VARCHAR specifications are accepted by SQLite, but do note that these are just regarded as TEXT.

SQLite does not enforce the length of a VARCHAR. You can declare a VARCHAR(10) and SQLite will be happy to store a 500-million character string there. And it will keep all 500-million characters intact. Your content is never truncated. SQLite understands the column type of “VARCHAR(N)” to be the same as “TEXT”, regardless of the value of N.

References