MySQL - Explain the difference between BOOL, TINYINT and BIT.

Explain the difference between BOOL, TINYINT and BIT.

1. BIT data type can store up to 8 bytes from My SQL version 5.0.3
2. BIT data type can be used only for binary data

Explain the difference between BOOL, TINYINT and BIT in MySQL.

BOOL : Used to store Boolean values, 0 being false and 1 being true. MySQL sets them as TINYINT type.
TINYINT : The range of this data type is -128 - +127 or 0 – 256 and occupies 1 byte.
BIT : Bit uses 8 bytes and stores only binary data.
MySQL ENUMs - What are ENUMs used for in MySQL?
MySQL ENUMs - Using Enum can restrict the number of values that can be allowed to go inside a table.....
MySQL Aggregate Functions - Explain MySQL Aggregate Functions.
MySQL Aggregate Functions - Aggregate functions in MySQL are a group of functions that are used to operate on a set of values.....
MySQL - Describe Transaction-Safe Table Types in MySQL
MySQL Transaction-Safe Table - While using transactions in MySQL a transaction –safe table type must be used. MyISAM is the default table type....
Post your comment