Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6530253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:43:58+00:00 2026-05-25T09:43:58+00:00

What is the difference between integer data types in sqlite? INT INTEGER TINYINT SMALLINT

  • 0

What is the difference between integer data types in sqlite?

INT
INTEGER
TINYINT
SMALLINT
MEDIUMINT
BIGINT
UNSIGNED BIG INT
INT2
INT8

Which one can store 32-bit integers and which one can store 64-bit values? Is there support for 128-bit?

I find integer data size a little confusing for now, INTEGER for example can store up to 64-bit signed integers, but values may occupy only 32 bits on disk.

Calling sqlite3_column_int on an INTEGER column will work only if the value stored is less that int32 max value, how will it behave if higher?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:43:58+00:00Added an answer on May 25, 2026 at 9:43 am

    From the SQLite3 documentation:

    http://www.sqlite.org/datatype3.html

    Most SQL database engines (every SQL database engine other than
    SQLite, as far as we know) uses static, rigid typing. With static
    typing, the datatype of a value is determined by its container – the
    particular column in which the value is stored.

    SQLite uses a more general dynamic type system. In SQLite, the
    datatype of a value is associated with the value itself, not with its
    container. The dynamic type system of SQLite is backwards compatible
    with the more common static type systems of other database engines in
    the sense that SQL statement that work on statically typed databases
    should work the same way in SQLite. However, the dynamic typing in
    SQLite allows it to do things which are not possible in traditional
    rigidly typed databases.

    So in MS Sql Server (for example), an “int” == “integer” == 4 bytes/32 bits.

    In contrast, a SqlLite “integer” can hold whatever you put into it: from a 1-byte char to an 8-byte long long.

    The above link lists all types, and gives more details about Sqlite “affinity”.

    The C/C++ interface you’re referring to must work with strongly typed languages.

    So there are two APIs: sqlite3_column_int(), max 4-byte; and sqlite3_column_int64()

    http://www.sqlite.org/capi3ref.html#sqlite3_int64

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Difference between TinyInt / SmallInt / MediumInt / Int / BigInt in MySQL data
I know the difference in memory usage between byte, unsigned short, and integer, but
Is there any difference between int on_exit(void (*function)(int , void *), void *arg); and
Is the difference between integer multiply(temporarily forgetting about division) still in favor of shifting
What is the difference between early and late binding?
Is there a performance difference between i++ and ++i if the resulting value is
What is actually the difference between these two casts? SomeClass sc = (SomeClass)SomeObject; SomeClass
What is the difference between TrueType fonts and Type-1 fonts?
What is the difference between Build Solution and Batch Build in Visual Studio 2008?
What is the difference between a Group and a Match in .NET's RegEx?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.