Home >> MySql >> String data types in MySql

String data types in MySql

The Following numeric data types are-

1)-CHAR(255 characters)-A fixed length  string between 1 and 255 characters  in length.Maximum hold 255 characters.

Example-In case Name char(60),Name is only 20 characters in length, then entry will padded with 40 characters worth of space. these spaces will be removed when the value is retrived through.

2)-VARCHAR(255 characters)-This data type is used to store variable length alphanumeric data.Maximum hold 4000 characters.

3)-TINYTEXT or TINYBLOB-A BLOB or TEXT column with a maximum length of 255 characters.you do not specify a length with TINYTEXT or TINYBLOB.

4)-TEXT or BLOB-A BLOB or TEXT column with a maximum length of 65535 characters.Binary large object(BLOB) are used to store large amounts of binary data, such as images or other types of files.TEXT field also use large amounts of data.

5)-MEDIUMTEXT or MEDIUMBLOB-A MEDIUMBLOB or MEDIUMTEXT column with a maximum length of 16777215 characters.you do not specify a length with MEDIUMTEXT or MEDIUMBLOB .

6)-LONGTEXT or LONGBLOB-A LONGBLOB or LONGTEXT column with a maximum length of 4294967295 characters.you do not specify a length with LONGTEXT or LONGBLOB .

Post Your Comment

Next Questions
Enum data types
SET data types
Difference between varchar and char
Difference between Tinyint and smallint
Difference between enum and set
Difference between signed and unsigned
What is key
What is super key
What is candidate key
What is primary key
What is unique key
What is foreign key
What is join
What is cross join
What is natural join
What is outer join
What is self join
What is aggregate function
COUNT(*) aggregate function
AVG() aggregate function
MIN() aggregate function
MAX() aggregate function
SUM() aggregate function
STDED() aggregate function
CONCAT() function

Copyright ©2022 coderraj.com. All Rights Reserved.