SQLiteStudio data types

1

I'm using SQLiteStudio to model a database. At the time of creating the fields of a table, I noticed that it has some data types that do not appear in the SQLite documentation. For example, in the combobox where we chose the column type, it has: BOOLEAN, DOUBLE, I searched the SQLite documentation and did not find these types of data.

    
asked by anonymous 07.02.2016 / 18:28

1 answer

3

documentation reports that it does not have boolean and informs that boolean values are stored as int , being false = 0 and true = 1 :

  

1.1 Boolean Datatype

     

SQLite does not have a separate Boolean storage class. Instead,   Boolean values are stored as integers 0 (false) and 1 (true).

Then, you treat in your application when the value of this field is 0, it is false and when it is 1, it is true .

And when at double , you can use real , which is also the recommendation of the documentation, according to the table below:

References:

SQLite - Data Type

Datatypes In SQLite Version 3

    
07.02.2016 / 18:36