LONGTEXT
LONGTEXT is a type of data type in SQL, specifically in MySQL. It is used to store large amounts of string data. The maximum length of LONGTEXT data type is 4,294,967,295 characters or 4GB. This data type is ideal for storing lengthy text-based data, such as articles or user comments.
Example
Output
Explanation
This example creates a new table ‘Sample’ with a column ‘Notes’ that has a data type of LONGTEXT. One row is then inserted into ‘Sample’, including a LONGTEXT value. The LONGTEXT data type in MySQL can contain a maximum of 4,294,967,295 characters, making it ideal for storing large amounts of text.