What is the difference between longblob and longtext in mysql?

What is the difference between longblob and longtext in mysql?

What should I use to keep a long topic?

+5
source share
3 answers

BLOB files are for binary large objects. If you store binary data in your database, then BLOB will be the type of table you want. Otherwise .. longtext.

In your case, longtext.

+18
source

BLOB and TEXT are basically identical, except that the TEXT fields have applicable character translation rules. There are no blobs. So with BLOB, what you invest in is what you get. With TEXT, what you put may not be what you go out.

+12

TEXT, , :

  • If you specify a different encoding for the join than the column TEXT(e.g. latin1column, utf-8requested), MySQL will convert the contents to the desired encoding.
  • You can sort and compare columns TEXTbased on sorting.

BLOB - these are just “binary sequences” and you will get them “as is”.

+4
source

All Articles