SQLWays Product Page - Migration to MySQL Free Evaluation

MySQL Data Types - LONGTEXT

Versions: MySQL 5.x, 4.x and 3.23

MySQL - LONGTEXT
Syntax LONGTEXT [CHARACTER SET charset | BINARY ] [COLLATE collate]
Data Variable-length character data, single-byte and multibyte character sets
Parameters CHARACTER SET specifies the character set, COLLATE specifies a collation for the character set.

BINARY is equal to specifying the binary collation
Range 4G (232 – 1) bytes
Trailing Spaces Not removed when the value is stored and retrieved. But trailing spaces are insignificant in comparisons, primary and unique keys
Error Handling Exceeding data truncated and a warning is generated if strict SQL mode is not enabled, otherwise in case of non-space characters truncation, an error is raised
Storage Size Actual entry length
Version Differences MySQL 4.1 and later - CHARACTER SET and COLLATE options are available
Standards MySQL Extension

MySQL LONGTEXT - Equivalents in Other Databases

Database Data Type and Conversion
Oracle CLOB, 4G; NCLOB, 4G, Unicode - UTF-8 or UTF-16
SQL Server VARCHAR(n | max), 1 ⇐ n ⇐ 8000, 2G if max is specified
PostgreSQL VARCHAR(n), 1 ⇐ n ⇐ 1G, TEXT, 1G
Sybase ASE TEXT, 2G
Informix TEXT, 2G, CLOB, 4T
HP Neoview VARCHAR(n), 1 ⇐ n ⇐ (32708 - size of other columns)

Related Data Types in MySQL

Data Types
Fixed-length character data CHAR(n) NCHAR(n)
Variable-length character data VARCHAR(n) NVARCHAR(n) TINYTEXT TEXT MEDIUMTEXT

All Data Types

Oracle SQL Server IBM DB2 MySQL PostgreSQL Sybase ASE Sybase ASA Informix DS Teradata HP Neoview Interbase/Firebird


SQLWays Product Page - Migration to MySQL Free Evaluation

Discussion

Enter your comment:
SKXDR
 
sqlways/mysql/data-types/longtext.txt · Last modified: April 25, 2012, 04:44:52 AM (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki