TINYTEXT
TINYTEXT is a data type in SQL that is used to store small strings of characters. Its maximum length is 255 characters. Unlike VARCHAR or CHAR data types, TINYTEXT has no specified length when declared and can store up to its maximum length if necessary. Text stored in a TINYTEXT column is not case-sensitive.
Example
Output
Explanation
In the example code, a table named Sample
is created with two columns: ID
and Description
. The ID
column is an integer type and the primary key of the table. The Description
column is of TINYTEXT
type, which can contain up to 255 characters. Then, a new record is inserted into the table with the description ‘Tinytext example’. The output shows the result of these SQL commands, confirming the creation of the table and the successful insertion of a new record.