substr分割字符串

获取Employees中的first_name

http://www.nowcoder.com/questionTerminal/74d90728827e44e2864cce8b26882105

select e.first_name
from employees e
order by substr(e.first_name,-2);

substr可分割字符串,将倒数后两个字符串分割出来,然后进行排序即可
substr(字段,指定分割位置,长度)

全部评论

相关推荐

代码飞升:别用口语,后端就写后端,前端就写前端,最后别光后悔
点赞 评论 收藏
分享
评论
6
1
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务