题解 | #获取Employees中的first_name#
获取Employees中的first_name
http://www.nowcoder.com/practice/74d90728827e44e2864cce8b26882105
三种方法都可以用
LEFT(s,n)返回字符串 s 的前 n 个字符
RIGHT(s,n)返回字符串 s 的后 n 个字符
第一种:(right)
select first_name from employees order by right(first_name,2)
第二种:(substr)
select first_name from employees order by substr(first_name,-2)
第三种:(substring)
select first_name from employees order by substring(first_name,-2)