使用以字母"a"开头的mysql查询查找所有名称 [英] find all the name using mysql query which start with the letter 'a'

查看:575
本文介绍了使用以字母"a"开头的mysql查询查找所有名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从表艺术家中查找名称以字母a,b,c开头的数据.

I want to find the data from table artists where name is start with letter a, b, c.

i.e. 
My o/p should contain
Adam
Alan
Bob
Ben
Chris
Cameron

But not GlAin, doC, dolBie

推荐答案

您可以使用'A%'这样的表达式,但是如果您希望此查询对大型表快速运行,建议您输入第一个按钮的数量进入具有int型int类型的单独字段.

You can use like 'A%' expression, but if you want this query to run fast for large tables I'd recommend you to put number of first button into separate field with tiny int type.

这篇关于使用以字母"a"开头的mysql查询查找所有名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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