Skip to content

TINYBLOB

CREATE TABLE employee_data(
id INT AUTO_INCREMENT,
data TINYBLOB,
PRIMARY KEY (id)
);
INSERT INTO employee_data(data) VALUES (CAST('This is TINYBLOB data' AS BINARY));
Query OK, 1 row affected (0.00 sec)

In the example provided, a table named employee_data is created with two columns: id and data. The id column is an integer type with the AUTO_INCREMENT attribute, making it the primary key for the table. The data column is of type TINYBLOB.

A row is then added to the employee_data table, with the TINYBLOB data column storing the binary data equivalent of the string ‘This is TINYBLOB data’. The output shows that the row insertion was successful.