mysql查询中的小问题 [英] little problem in mysql query

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

问题描述

在现有的mysql之后,我应该如何在mysql中插入新的内容.
我输入的第一行为
名字mobno.
ABC 123
现在我必须在mysql中再次插入一行
名字mobno
xyz 346
mysql表将结果显示为

名字mobno.
xyz 346
ABC 123

但我想要以下格式的结果

名字mobno.
ABC 123
xyz 346
请帮助我,它将解决我的大问题..

How should i insert a new in mysql after existing one.
First row i have entered as
name mobno.
ABC 123
now i have to insert again one row in mysql
name mobno
xyz 346
mysql table shows the result as

name mobno.
xyz 346
ABC 123

but I want result in the following format

name mobno.
ABC 123
xyz 346
Please help me it will solve my big problem..

推荐答案

您只需要以正确的方式订购即可.一种解决方案是简单地通过先将其全部转换为小写形式对其进行排序.
You would simply need to order it the correct way. A solution would be to simply order it by converting it all to lowercase first.
SELECT name, mobno FROM tb_users ORDER BY LOWER(name) ASC



祝你好运!



Good luck!


通过按"id"的降序对操作进行设置
By doing setting in operation in descending order to the ''id''


这篇关于mysql查询中的小问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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