MySQL查询检查where子句中的blob列类型 [英] Mysql query check the blob column type in where clause

查看:57
本文介绍了MySQL查询检查where子句中的blob列类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现 CONVERT(使用utf8的对象)用于将blob转换为文本,但是在where子句中似乎并不高效,就像这样:

I found out that CONVERT(object USING utf8) is for converting blob to text, but it doesn't seem efficient in the where clause, like this:

Select * 
from Page 
where CONVERT(Page.page_title USING utf8) = 'AccessibleComputing'

这是唯一的方法也是正确的方法吗?因为这花费了太多时间.还是应该以某种方式将"AccessibleComputing"转换为二进制文件然后放入其中?

Is this the only way and the correct way? because it is taking too much time. Or should I convert 'AccessibleComputing' to binary in a way and then put it there?

推荐答案

我尝试了此方法,并且有效:

I tried this and it worked:

Select * from Page where Page.page_title = 'AccessibleComputing'

我认为毕竟不需要任何转换.

I think after all it doesn't need any conversion.

这篇关于MySQL查询检查where子句中的blob列类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆