尝试使用 mysql 获取第一个字母大写的单词
我已经
Visit table
Visit_Id
Visit_Date values(09-09-2011)
Visit_status values like (accepted , refused)
member_Id
这样做了以获得访问次数 通过使用下面的查询,
SELECT visit_Status as Status, COUNT('x') AS Visits
FROM visits
WHERE visit_Date BETWEEN '2011-06-20' AND '2011-07-20'
GROUP BY visit_Status
它给出这样的结果
Status Visits
accepted 2
refused 4
我可以得到这样的结果
Status Visits
Accepted 2
Refused 4
with upper case letter on first letter of status i mean like this ( Accepted , Refused) instead of this one (accepted , refused)
我正在使用 mysql 工作台
I have
Visit table
Visit_Id
Visit_Date values(09-09-2011)
Visit_status values like (accepted , refused)
member_Id
i have done like this for getting number of visits
by using below query
SELECT visit_Status as Status, COUNT('x') AS Visits
FROM visits
WHERE visit_Date BETWEEN '2011-06-20' AND '2011-07-20'
GROUP BY visit_Status
it was giving results like this
Status Visits
accepted 2
refused 4
can i get the results like this
Status Visits
Accepted 2
Refused 4
with upper case letter on first letter of status i mean like this ( Accepted , Refused) instead of this one (accepted , refused)
I am using mysql work bench
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你可以使用 SUBSTRING 和 上部
u can use SUBSTRING and UPPER
这将做你想做的事:
This will do what you want: