left(str, end)
LEFT(str,8) #表示 从左截取字符串,8表示end是第几个字符 可以这样理解
substr(str,1, 8)
#如果str='hello world !'; 那么返回结果就是(hello wo)
right(str, end)
RIGHT(str,8) #表示 从右截取字符串,从end往前8个字符 可以这样理解
select substring('hello world !',length('hello world !')-7, length('hello world !'))
#如果str='hello world !'; 那么返回结果就是( world !)
concat(left()),‘****’, right())
concat(left(phone,3),"****",right(phone,4))
left(phone,3)意思是拼接手机号前3位、right(phone,4)意思是拼接手机号后4位、中间用*表示来返回