8

How to get the size of a record in MySql if the table contains fields of type TEXT or BLOB?

is it possible to get the size of a record or table using sql statement?

Osama
  • 93
  • 1
  • 1
  • 6

1 Answers1

7

To calculate the size of a string or blob in bytes, use LENGTH(YourColumn).

To calculate the number of characters in a text string, use CHAR_LENGTH(YourTextColumn).

Mark Byers
  • 811,555
  • 193
  • 1,581
  • 1,452