Create table: BLOB
/*
mysql> Drop table Inventory;
Query OK, 0 rows affected (0.01 sec)
mysql> CREATE TABLE Inventory
-> (
-> ID SMALLINT UNSIGNED,
-> Name VARCHAR(40),
-> Photo BLOB,
-> Quantity INT UNSIGNED
-> );
Query OK, 0 rows affected (0.04 sec)
mysql> Describe Inventory;
+----------+----------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+----------------------+------+-----+---------+-------+
| ID | smallint(5) unsigned | YES | | NULL | |
| Name | varchar(40) | YES | | NULL | |
| Photo | blob | YES | | NULL | |
| Quantity | int(10) unsigned | YES | | NULL | |
+----------+----------------------+------+-----+---------+-------+
4 rows in set (0.01 sec)
*/
Drop table Inventory;
CREATE TABLE Inventory
(
ID SMALLINT UNSIGNED,
Name VARCHAR(40),
Photo BLOB,
Quantity INT UNSIGNED
);
Describe Inventory;
Related examples in the same category