Hi All,
Can one anyone provide any information on whether can we store normal text data(varchar) in mysql or sqlite Blob data type
Hi All,
Can one anyone provide any information on whether can we store normal text data(varchar) in mysql or sqlite Blob data type
You can store any binary data in a blob. This would include both ascii and unicode text. However, you would need to explicitly interpret this as text in your code since an SQL interface would have no idea what type of data was stored inside its binary field.
Why would you want to use this rather than a normal varchar or text field?
A BLOB is just a bunch of bytes -- no hindrance no help dealing with them in any way; a VARCHAR is known to be text so such things as character encoding and collation come into play. So, store bunches of bytes (e.g. images) as BLOBs, bunches of text as TEXT or VARCHAR!
SQLite uses manifest typing, so you can put any type of data in any type of column, actually. Then you'll have to interpret the returned data yourself, just like everyone pointed out for MySQL.