Home Tutorial Php Sql MySQL BLOB

 
 

MySQL BLOB
Posted on: December 9, 2010 at 12:00 AM
This example illustrates how to create the BLOB type field in table.

MySQL BLOB

This example illustrates how to create the BLOB type field in table.

In this example we create a 'pictures' table with id integer type and image field blob type.

 

Query

 

CREATE TABLE `pictures` (
    `id` int(11) NOT NULL auto_increment, 
    `image` blob, PRIMARY KEY(`id`)
);
 
Output

 

+-------+---------+------+-----+---------+----------------+
| Field | Type    | Null | Key | Default | Extra          |
+-------+---------+------+-----+---------+----------------+
| id    | int(11) | NO   | PRI |         | auto_increment |
| image | blob    | YES  |     |         |                |
+-------+---------+------+-----+---------+----------------+

 

Related Tags for MySQL BLOB:


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.