mysql varbinary和varchar如何相互转化 字段类型是varbinary 现在要对字段做if判断,如if(name='xx',1,0) 就算是name=xx了也是输出0 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 按你的思路应该是:case convert(varchar(max),name,2) when 'abcd' then 1 else 0 end或者更好的应该是这样case name when convert(varbinary(max),'abcd',2) then 1 else 0 end 存储过程优化求学习 mysql6的问题 mysql查询问题,高手帮帮忙 求一个思路 大侠!帮我看看!--可怜的菜菜 高分求答:mysql为何报如此错误 急急急急急!!!!(在线等待) 关于访问mysql中数据的一点问题 请问错误提示为"2006:MySQL Server has gone away"是什么错误? qt连接mysql诡异错误 数据核对问题 【求助】数据库,一张表里面多对多的数据统计问题
case convert(varchar(max),name,2) when 'abcd' then 1 else 0 end
或者更好的应该是这样
case name when convert(varbinary(max),'abcd',2) then 1 else 0 end