mysql left 字符串截取的数据可以用来在where筛选吗?

MySql 码拜 8年前 (2016-02-07) 773次浏览
select left (content,1) as abstract ,id from tiku_items_options where item_id = “28606”
mysql left 字符串截取的数据可以用来在where筛选吗?
本人想这样写
select left (content,1) as abstract ,id from tiku_items_options where item_id = “28606” where abstract = “A”;
但是不行。
问一下一下有什么办法可以筛选吗?
解决方案

10

select left (content,1) as abstract ,id from tiku_items_options where item_id = “28606” where  left (content,1)= “A”;

10

select left (content,1) as abstract ,id from tiku_items_options where item_id = “28606” where left (content,1) = “A”;

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明mysql left 字符串截取的数据可以用来在where筛选吗?
喜欢 (0)
[1034331897@qq.com]
分享 (0)