Data Types


What is a Data Type? I don't know how to be more explanatory then this, a data type is, well a type of data, such as an integer (a whole number), a text string, a boolean (true or false).



This is also where MySQL and SQLite are very similar, while SQLite does not have all the MySQL Data types, it has more then enough to get by.



VARCHAR(NUMBER) - VARCHAR stands for various character(s), simply replace NUMBER with how long you want to allow the string to be, such as, if you replace NUMBER with 3, you can only have a string length of up to 3, but it can be shorter.



NVARCHAR(NUMBER) - This is much like the VARCHAR Data type, however it is used to store Unicode Data, other then that, treat it like VARCHAR



TEXT - TEXT is quite self explanatory, you use this to store text strings, such as posts, page contents, and such.



INT(NUMBER) - INT is a Integer, a whole number, such as 1, 2, 3 etc. but NOT 1.1, 3.2, it MUST be a whole number, and of course, like VARCHAR, NUMBER is how long you want to allow the number string to be.



FLOAT - This is how you can store numbers that are not whole, such as 1.1, 100.003, you may need to use the round function so the numbers won't be displayed as 1.10000000...



BOOLEAN - A Boolean or Bool is a true or false, just as a note, 0 is treated as false, and 1 or higher is true



CLOB - Coming Soon!



BLOB - Coming Soon!



TIMESTAMP - A Unique kind of Data type, every time the row gets updated, so does this, however, I have not yet used this, so I cannot give any insight.



NUMERIC(NUM, NUM2 [,NUM3[,...]]) - Separate all numbers you want to allow in this row with commas.



VARYING CHARACTER (NUMBER) - From what I understand, this is like VARCHAR, so refer to the VARCHAR Data type above.