TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

MySQL

MySQL String Data Types

Overview

In this tutorial, we will learn about MySQL String Data Types. Strings are an important data type. A String is used for storing character strings. A character string is a sequence of characters.

String data types

String data types provided in MySQL are as follows.

  • CHAR
  • VARCHAR
  • TINYTEXT
  • TEXT
  • MEDIUMTEXT
  • LONGTEXT

 

 

String Data Type
Description
CHAR CHAR data type is for fixed-length strings. Fixed-length means that a string is stored using a fixed number of bytes. It is right-padded with spaces to the specified length when stored.
VARCHAR VARCHAR data type is for variable-length strings. Variable-length stores the string value and string length together. The amount of storage space that VARCHAR uses depends on the number of characters in the string
TINYTEXT TINYTEXT data type is for variable-length strings and allows up to a maximum of 255 characters
TEXT The TEXT data type is used for variable-length strings and allows up to a maximum of 65,535 characters
MEDIUMTEXT MEDIUMTEXT data type is for variable-length strings and allows up to a maximum of 16,777,215 characters
LONGTEXT LONGTEXT data type is for variable-length strings and allows up to a maximum of 4,294,967,295 characters. The maximum permitted length depends on the client/server protocol

 

 

—

MySQL Tutorials

MySQL Tutorials on this website:

https://www.testingdocs.com/mysql-tutorials-for-beginners/

For more information on MySQL Database:

https://www.mysql.com/

Related Posts

DataGrip Desktop Shortcut

MySQL /

Launch DataGrip on Windows

DataGrip Download

MySQL /

Install DataGrip IDE on Windows 11

MySQL Workbench Windows 11

MySQL /

New MySQL Connection in Workbench

MySQL Command-line Client

MySQL /

Command-Line MySQL Client

Start MySQL Client

MySQL /

Start MySQL Client on Windows 11

‹ MySQL REVERSE Function› MySQL Numeric Data types

Recent Posts

  • Scaler Academy – An Online Learning Platform
  • Difference between PHP and JavaScript?
  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com