Home Tutorial Php Sql MySQL Boolean Data Type

 
 

Share on Google+Share on Google+
MySQL Boolean Data Type
Posted on: December 9, 2010 at 12:00 AM
Advertisement
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  |     |         |       |
+-------+---------------+------+-----+---------+-------+

 

Advertisement

Related Tags for MySQL Boolean Data Type:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 9, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com