从右开始截取
right(str, length)
说明:right(被截取字段,截取长度)
从左开始截取
left(str, length)
说明:right(被截取字段,截取长度)
substring(str, pos)
说明:substring(被截取字段,从第几位开始截取)
substring(str, pos, length)
说明:substring(被截取字段,从第几位开始截取,截取长度)
substring_index(str,delim,count)
说明:substring_index(被截取字段,关键字,关键字出现的次数)
表:mysql "exists"和“not exists"的区别
select name
from base_store_info
where not exists (select * from ml_store_product where ml_store_product.store_sid=base_store_info.sid)
结果:
select sid,name
from base_store_info
where exists (select * from ml_store_product where ml_store_product.store_sid=base_store_info.sid)
结果: