Home Tutorial Php Sql MySQL Boolean Data Type

 
 

MySQL Boolean Data Type
Posted on: December 9, 2010 at 12:00 AM
This example illustrates how create a boolean data type.

MySQL Boolean Data Type

This example illustrates how create a boolean data type.

In this example we create a table 't' where define four field that is 'a' which is BOOL type, 'b' which is FLOAT type, 'c' which is LONG VARCHAR type and 'd' which is NUMERIC type. The Complete table display below.

 

Query

 

CREATE TABLE t (a BOOL, b FLOAT8, c LONG VARCHAR, d NUMERIC);

 

Query

 

DESCRIBE t;

 

Output

 

+-------+---------------+------+-----+---------+-------+
| Field | Type          | Null | Key | Default | Extra |
+-------+---------------+------+-----+---------+-------+
| a     | tinyint(1)    | YES  |     |         |       |
| b     | double        | YES  |     |         |       |
| c     | mediumblob    | YES  |     |         |       |
| d     | decimal(10,0) | YES  |     |         |       |
+-------+---------------+------+-----+---------+-------+

 

Related Tags for MySQL Boolean Data Type:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.