substring_index(str,delim,count) 
说明:substring_index(被截取字段,关键字,关键字出现的次数)

范例

mysql> SELECT SUBSTRING_INDEX('www.mysql.com', '.', 2);
        -> 'www.mysql'
mysql> SELECT SUBSTRING_INDEX('www.mysql.com', '.', -2);
        -> 'mysql.com'

相关文章:

  • 2021-12-19
  • 2022-12-23
  • 2021-07-22
  • 2022-02-11
  • 2021-06-19
  • 2021-08-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-22
  • 2022-12-23
  • 2021-07-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案