mysql根据字段内容长度排序
文章描述:
SELECT * FROM `lbs_user` ORDER BY CHAR_LENGTH(ni […]
SELECT * FROM `lbs_user` ORDER BY CHAR_LENGTH(nickname) DESC
查询username字符串长度大于4的数据
SELECT * FROM `lbs_user` WHERE LENGTH(username) > 4
结果只有id=1的数据
发布时间:2024/12/20
文章描述:
SELECT * FROM `lbs_user` ORDER BY CHAR_LENGTH(ni […]
SELECT * FROM `lbs_user` ORDER BY CHAR_LENGTH(nickname) DESC
查询username字符串长度大于4的数据
SELECT * FROM `lbs_user` WHERE LENGTH(username) > 4
结果只有id=1的数据
发表评论